Page MenuHomePhorge
Diviner Arcanist Tech Docs phutil_is_utf8_slowly

function phutil_is_utf8_slowly($string, $only_bmp)
Arcanist Technical Documentation ()

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$stringSome string which may or may not be valid UTF-8.
bool$only_bmpTrue to require all characters be part of the basic multilingual plane (no more than 3-bytes long).
Return
boolTrue if the string is valid UTF-8.