Sanitizer
final class Sanitizer (View source)
| internal | This class is not covered by the backward compatibility promise for PHPUnit |
Methods
static string
sanitizeBidirectionalControlCharacters(string $value)
Replaces Unicode bidirectional formatting characters with their visible \u{NNNN} escape sequence.
Details
static string
sanitizeBidirectionalControlCharacters(string $value)
Replaces Unicode bidirectional formatting characters with their visible \u{NNNN} escape sequence.
Matches the UTF-8 byte sequences for U+202A-U+202E and U+2066-U+2069 directly so that the function is safe to call on strings that are not valid UTF-8.