src/helpers/StringHelper.php
private static function _escapeStringCallback(array $match): string
    {
        if (isset($match[2])) {
            return self::ESCAPE_SPECIALS[$match[2]]
                ?? \sprintf('\\x%02X', \ord($match[2]));
        }
        return '\\' . $match[1];
    }
private static function _escapeStringCallback(array $match): string
    {
        if (isset($match[2])) {
            return self::ESCAPE_SPECIALS[$match[2]]
                ?? \sprintf('\\x%02X', \ord($match[2]));
        }
        return '\\' . $match[1];
    }
private static function _escapeStringCallback ( array $ match ) : string { if ( isset ( $ match [ 2 ] ) ) { return self :: ESCAPE_SPECIALS [ $ match [ 2 ] ] ?? \ sprintf ( '\\x%02X' , \ ord ( $ match [ 2 ] ) ) ; } return '\\' . $ match [ 1 ] ; }
Internal callback to escape characters
@param array $match A match from `preg_replace_callback()`
@return string
Internal callback to escape characters