PHP IntlChar()

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)