src/Tool/StringTool.php
public static function str_utf8_chinese_word_count($str = "")
    {
        $str = preg_replace(self::UTF8_SYMBOL_PATTERN, "", $str);
        return preg_match_all(self::UTF8_CHINESE_PATTERN, $str, $arr);
    }
public static function str_utf8_chinese_word_count($str = "")
    {
        $str = preg_replace(self::UTF8_SYMBOL_PATTERN, "", $str);
        return preg_match_all(self::UTF8_CHINESE_PATTERN, $str, $arr);
    }
public static function str_utf8_chinese_word_count ( $ str = "" ) { $ str = preg_replace ( self :: UTF8_SYMBOL_PATTERN , "" , $ str ) ; return preg_match_all ( self :: UTF8_CHINESE_PATTERN , $ str , $ arr ) ; }
count only chinese words
@param string $str
@return int
count only chinese words