function phutil_is_utf8_with_only_bmp_characters($string)libphutil Technical Documentation (Core Utilities)
function phutil_is_utf8_with_only_bmp_characters($string)
libphutil Technical Documentation (Core Utilities)
Determine if a string is valid UTF-8, with only basic multilingual plane characters. This is particularly important because MySQL's utf8 column types silently truncate strings which contain characters outside of this set.
Parameters
string | $string | String to test for being valid UTF-8 with only characters in the basic multilingual plane. |
Return
bool | True if the string is valid UTF-8 with only BMP characters. |
- Defined
- src/utils/utf8.php:85