PHP IntlChar()

百度 外媒:英首相动员欧盟20国协同驱逐俄外交官2018年3月26日02:27来源:参考消息网    参考消息网3月25日报道外媒称,多达20个欧盟国家正准备驱逐与莫斯科间谍网络有联系的俄罗斯外交官。

PHP 7 supports internationalization (i18n) and localization (l10n) through the intl extension. This extension is just a basic wrapper for the ICU library and provides similar methods and features to the ICU library.

PHP 7 exposes the Unicode character features in ICU through the new IntlChar class. This class itself defines many static methods for operating unicode characters from multiple character sets.

Example

Example

<?php
printf('%x', IntlChar::CODEPOINT_MAX);
echo IntlChar::charName('@');
var_dump(IntlChar::ispunct('!'));
?>

The execution output of the above program is:

10ffff
COMMERCIAL AT
bool(true)