📅  最后修改于: 2022-03-11 14:54:01.975000             🧑  作者: Mango
//get the number of characters in a string of UTF8
$utf8_char="اÙسÙاÙ
عÙÛÚ©Ù
";
$size_utf8 = mb_strlen($utf8_char, 'utf8');
$size_strlen = strlen($utf8_char);
echo $size_utf8; //12
echo $size_strlen; //23!!