我试图计算用非拉丁语言(保加利亚语)编写的变量中的单词数。但似乎str_word_count()并未计算非拉丁字。php文件的编码为UTF-8
$str = "????? ?? ????????"; echo 'Number of words: '.str_word_count($str); //this returns 0
php count
count ×1
php ×1