函数名:IntlChar::enumCharTypes() 函数描述:该函数通过遍历Unicode字符集合,返回每个字符的类型。 适用版本:该函数适用于PHP 7.0及以上版本。 用法: 返回所有字...
函数名:IntlChar::enumCharTypes()
函数描述:该函数通过遍历Unicode字符集合,返回每个字符的类型。
适用版本:该函数适用于PHP 7.0及以上版本。
用法:
$result = IntlChar::enumCharTypes();
print_r($result);
$result = IntlChar::enumCharTypes();
foreach ($result as $char => $type) {
echo "Character: " . IntlChar::chr($char) . ", Type: " . IntlChar::charType($char) . "\n";
}
示例解释:
注意事项: