PHP | IntlChar::charAge() Function Last Updated : 04 Feb, 2021 Comments Improve Suggest changes Like Article Like Report 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 accept newer characters. Syntax: array IntlChar::charAge( $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 return the Unicode version number of an array. Below programs illustrate the IntlChar::charAge() function in PHP. Program 1: PHP <?php // PHP code to illustrate IntlChar::charAge() // function // Input int codepoint value var_dump(IntlChar::charage("\u{2025}")); echo "<br>"; // Input character codepoint value var_dump(IntlChar::charage("\u{1F878}")); echo "<br>"; // Input int codepoint value var_dump(IntlChar::charage("\u20")); echo "<br>"; // Input character codepoint value var_dump(IntlChar::charage("Geeks")); echo "<br>"; ?> Output: array(4) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(0) } array(4) { [0]=> int(7) [1]=> int(0) [2]=> int(0) [3]=> int(0) } NULL NULL Program 2: PHP <?php // PHP code to illustrate IntlChar::charAge() // Declare an array $arr $arr = array("^", "2345", "6", "\n"); // Loop run for every array element foreach ($arr as $val){ // Check each element as code point data var_dump(IntlChar::charage($val)); echo "<br>"; } ?> Output: array(4) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(0) } NULL array(4) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(0) } array(4) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(0) } Related Articles: IntlChar::isalpha() FunctionIntlChar::isbase() FunctionIntlChar::isblank() FunctionIntlChar::iscntrl() Function Reference: http://php.net/manual/en/intlchar.charage.php Comment More infoAdvertise with us Next Article PHP | IntlChar::charAge() Function jit_t Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Intl Similar Reads 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::chr() Function 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 $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 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 enumCharNames() Function The IntlChar::enumCharNames() function is an inbuilt function in PHP which is used to give a catalog of all the assigned Unicode characters that are available within a range. The list will have the Unicode characters that are available between the start code points (start inclusive) and the limit co 2 min read PHP | IntlChar::charDigitValue() Function The IntlChar::charDigitValue() function is an inbuilt function in PHP which is used to return the decimal digit value from a decimal digit character. Where the general category decimal digit numbers and "Nd" is Numeric_Type of Decimal.Syntax:Â Â int IntlChar::charDigitValue( $codepoint ) Parameters: 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 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 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 PHP | IntlChar enumCharTypes() Function The IntlChar::enumCharTypes() function is an inbuilt function in PHP which is used to give a catalog of all the code points with their Unicode general categories. All the cataloging happens very efficiently of all the code points. For enumerating all the assigned code points and building data struct 2 min read Like