English 中文(简体)
PHP 7 - IntlChar
  • 时间:2024-12-22

PHP 7 - IntlChar


Previous Page Next Page  

In PHP7, a new IntlChar class is added, which seeks to expose additional ICU functionapty. This class defines a number of static methods and constants, which can be used to manipulate unicode characters. You need to have Intl extension installed prior to using this class.

Example

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

It produces the following browser output −

10ffff
COMMERCIAL AT
true
Advertisements