PHP IntlChar()
PHP 7 supports internationalization (i18n) and localization (l10n) through the intl extension. This extension is merely a basic wrapper around the ICU library and provides methods and features similar to the ICU library.
PHP 7 exposes Unicode character features from ICU through the new IntlChar class. This class itself defines many static methods for manipulating Unicode characters in multiple character sets.
Examples
Examples
<?php
printf('%x', IntlChar::CODEPOINT_MAX);
echo IntlChar::charName('@');
var_dump(IntlChar::ispunct('!'));
?>
printf('%x', IntlChar::CODEPOINT_MAX);
echo IntlChar::charName('@');
var_dump(IntlChar::ispunct('!'));
?>
The output of the above program is:
10ffff COMMERCIAL AT bool(true)
Other Extensions
PHP 7 New Features