function phutil_is_utf8_slowly($string, $only_bmp)libphutil Technical Documentation (Core Utilities)
function phutil_is_utf8_slowly($string, $only_bmp)
libphutil Technical Documentation (Core Utilities)
Determine if a string is valid UTF-8, slowly.
This works on any system, but has very poor performance.
You should call phutil_is_utf8() instead of this function, as that function can use more performant mechanisms if they are available on the system.
Parameters
string | $string | Some string which may or may not be valid UTF-8. |
bool | $only_bmp | True to require all characters be part of the basic multilingual plane (no more than 3-bytes long). |
Return
bool | True if the string is valid UTF-8. |
- Defined
- src/utils/utf8.php:124