The IntlChar::chr() function is used to check whether the entered character is Unicode value or not
Syntax
IntlChar::chr( val )
Parameters
val − A character value encoded as a UTF-8 string.
Return
The IntlChar::chr() function returns TRUE if the val is a Unicode character.
Example
The following is an example −
<?php var_dump(IntlChar::chr("A")); echo "<br>"; var_dump(IntlChar::chr("bh")); echo "<br>"; var_dump(IntlChar::chr("^")); ?>
Output
The following is the output −
string(1) "A" NULL string(1) "^"