PHP | IntlChar::chr() Function Last Updated : 25 Mar, 2021 Comments Improve Suggest changes Like Article Like Report The IntlChar::chr() function is an inbuilt function in PHP which is used to check whether the given input character is Unicode code point value or not. It returns Unicode character by code point value.Syntax: string IntlChar::chr( $codepoint ) Parameters: This function accepts a single parameter $codepoint which is mandatory. The input parameter is a character or integer value, which is encoded as a UTF-8 string.Return Value: In True cases, the $codepoint string contain the single character, which is specified by the Unicode code point value, otherwise return NULL.Below programs illustrate the IntlChar::chr() function in PHP: Program 1: php <?php // PHP function to illustrate // the use of IntlChar::chr() // Input int codepoint value var_dump(IntlChar::chr(" ")); // Input int codepoint value var_dump(IntlChar::chr(101)); // Input char codepoint value var_dump(IntlChar::chr("G")); // Input char codepoint value var_dump(IntlChar::chr("Geeks")); // Input Symbolic codepoint value var_dump(IntlChar::chr("$")); // Input Symbolic codepoint value var_dump(IntlChar::chr("#")); // Input Symbolic codepoint value var_dump(IntlChar::chr("@")); ?> Output: string(1) " " string(1) "e" string(1) "G" NULL string(1) "$" string(1) "#" string(1) "@" Program 2: php <?php // PHP function to illustrate the // use of IntlChar::chr // Declare an array with // different codepoint value $arr = array("D", ("E"), 77, 123, 65, 97, ); // For loop condition to check // each character through function foreach ($arr as $val) { // Check each element as code point data var_dump(IntlChar::chr($val)); } ?> Output: string(1) "D" string(1) "E" string(1) "M" string(1) "{" string(1) "A" string(1) "a" Related Articles: PHP | chr() FunctionIntlChar::isWhitespace() FunctionIntlChar::isUUppercase() Function Reference: http://php.net/manual/en/intlchar.chr.php Comment More infoAdvertise with us Next Article PHP | IntlChar::chr() Function jit_t Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Intl Similar Reads PHP | IntlChar::charAge() Function The IntlChar::charAge() function is an inbuilt function in PHP which is used to calculate the age of code point. Where the age is Unicode version when the code point was first designated or assigned a character. This can be useful to avoid emitting code points to receiving processes that do not acce 2 min read PHP IntlChar::charName() Function PHP IntlChar::charName() function is an inbuilt function in PHP used to retrieve the name of a Unicode character. Syntax: string IntlChar::charName( $codepoint [, $nameChoice = IntlChar::UNICODE_CHAR_NAME] ) Parameters: This function accepts two parameters as mentioned above and described below: $co 2 min read PHP | IntlChar charType() Function The IntlChar::charType() function is an inbuilt function in PHP which is used to get the general category value for a code point. This function returns the general category value for the code point. Syntax: int IntlChar::charType ( $codepoint ) Parameters: This function accepts a single parameter $c 2 min read PHP | IntlChar::charMirror() Function The IntlChar::charMirror() function is an inbuilt function in PHP which is used to find the "mirror-image" character from the given input code point character, which maps the specified character. Syntax: mixed IntlChar::charMirror( $codepoint ) Parameters: This function accepts a single parameter $c 2 min read PHP | IntlChar digit() function The IntlChar::digit() function is an inbuilt function in PHP which is used to get the decimal digit value of a code point for a given radix. This function returns the decimal digit value of the code point in the specified radix. Syntax: int IntlChar::digit( $codepoint, $radix ) Parameters: This func 2 min read PHP | IntlChar charFromName() Function The IntlChar::charFromName() function is an inbuilt function in PHP which is used to find Unicode character by name and returns the code point value. If Unicode character name does not match to a code point, then it returns NULL. Syntax: int IntlChar::charFromName( $characterName, $nameChoice = Intl 2 min read PHP IntlChar::ord() Function The IntlChar::ord() function is an inbuilt function in PHP which is used to return the Unicode code point value of the given character. Syntax: int IntlChar::ord( $character ) Parameters: This function accepts a single parameter $character which is mandatory. This parameter is a Unicode character. R 2 min read PHP | IntlChar foldCase() Function The IntlChar::foldCase() function is an inbuilt function in PHP which is used to perform case folding on a code point. Case folding means the given character is mapped to its equivalent lowercase characters.Syntax: mixed IntlChar::foldCase( $codepoint, $options = IntlChar::FOLD_CASE_DEFAULT ) Parame 1 min read PHP | IntlChar::forDigit() Function The IntlChar::forDigit() function is an inbuilt function in PHP which is used to determines the character representation for a specific digit in the specified radix. Syntax: int IntlChar::forDigit( $digit, $radix ) Parameters: This function accepts two parameters as mentioned above and described bel 2 min read PHP | IntlChar charDirection() Function The IntlChar::charDirection() function is an inbuilt function in PHP which is used to get the bidirectional category value for a code point. It returns the bidirectional category value for the code point, which is used in the Unicode bidirectional algorithm. Syntax: int IntlChar::charDirection ( $co 2 min read Like