src/Tool/StringTool.php
public static function str_utf8_mix_word_count($str = "")
    {
        $str = preg_replace(self::UTF8_SYMBOL_PATTERN, "", $str);
        return self::str_utf8_chinese_word_count($str) + str_word_count(preg_replace(self::UTF8_CHINESE_PATTERN, "", $str));
    }
public static function str_utf8_mix_word_count($str = "")
    {
        $str = preg_replace(self::UTF8_SYMBOL_PATTERN, "", $str);
        return self::str_utf8_chinese_word_count($str) + str_word_count(preg_replace(self::UTF8_CHINESE_PATTERN, "", $str));
    }
public static function str_utf8_mix_word_count ( $ str = "" ) { $ str = preg_replace ( self :: UTF8_SYMBOL_PATTERN , "" , $ str ) ; return self :: str_utf8_chinese_word_count ( $ str ) + str_word_count ( preg_replace ( self :: UTF8_CHINESE_PATTERN , "" , $ str ) ) ; }
count both chinese and english
@param string $str
@return int
count both chinese and english