Function utf8_compliant
Tests whether a string complies as UTF-8. This will be much faster than utf8_is_valid but will pass five and six octet UTF-8 sequences, which are not supported by Unicode and so cannot be displayed correctly in a browser. In other words it is not as strict as utf8_is_valid but it's faster. If you use is to validate user input, you place yourself at the risk that attackers will be able to inject 5 and 6 byte sequences (which may or may not be a significant risk, depending on what you are are doing)
Package: utf8
See:
See: http://www.php.net/manual/en/reference.pcre.pattern.modifiers.php#54805
Located at vendor/joomla/string/src/phputf8/utils/validation.php
See:
utf8_is_valid()
See: http://www.php.net/manual/en/reference.pcre.pattern.modifiers.php#54805
Located at vendor/joomla/string/src/phputf8/utils/validation.php
Parameters summary
string |
$str |
UTF-8 string to check |
Return value summary
boolean
|
TRUE if string is valid UTF-8 |