PHP IntlChar::ord() Function Last Updated : 03 Apr, 2023 Comments Improve Suggest changes Like Article Like Report 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. Return Value: It returns the Unicode code point value as an integer. Below examples illustrate the IntlChar::ord() Function in PHP: Example 1: In this example, we will use the ord() function. PHP <?php // PHP function to illustrate // the use of IntlChar::ord() // Input int codepoint value var_dump(IntlChar::ord("4")); // Input character codepoint value var_dump(IntlChar::ord("B")); // Input character codepoint value var_dump(IntlChar::ord("b")); //Input int codepoint value var_dump(IntlChar::ord("2018")); // Input character codepoint value var_dump(IntlChar::ord("Geeks")); // Input symbolic codepoint value var_dump(IntlChar::ord("@")); // Input symbolic codepoint value var_dump(IntlChar::ord("*")); // Input space codepoint value var_dump(IntlChar::ord(" ")); ?> Output: int(52) int(66) int(98) NULL NULL int(64) int(42) int(32) Example 2: In this example, we will use the ord() function. PHP <?php // PHP function to illustrate the // use of IntlChar::ord() // Declare an array with // different codepoint value $arr = array("X", "x", "*", "8", "0", " ", "&", ")", "99", ); // For loop condition to check // each character through function foreach ($arr as $val) { // Check each element as code point data var_dump(IntlChar::ord($val)); } ?> Output: int(88) int(120) int(42) int(56) int(48) int(32) int(38) int(41) NULL Related Articles: ord() FunctionIntlChar::isspace() FunctionIntlChar::isIDStart() Function Reference: http://php.net/manual/en/intlchar.ord.php Comment More infoAdvertise with us Next Article PHP IntlChar::ord() Function J jit_t Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Intl Similar Reads PHP | IntlChar::islower() Function The IntlChar::islower() function is an inbuilt function in PHP which is used to check whether the given input character is a lowercase character or not. Syntax: bool IntlChar::islower( $codepoint ) Parameter: This function accepts a single parameter $codepoint which is mandatory. The input parameter 2 min read PHP | IntlChar isMirrored() Function The IntlChar::isMirrored() function is an inbuilt function in PHP which is used to check the code point contains Bidi_Mirrored property or not. This property is used to set the characters that are commonly used in Right-To-Left contexts and need to be displayed with a mirrored graph. Syntax: bool In 2 min read PHP | IntlChar::iscntrl() Function The IntlChar::iscntrl() function is an inbuilt function in PHP which is used to check the given input is a control character or not. Control characters are line feed, tab, escape, etc. A control character is one of the following types: ISO 8-bit control character (U+0000..U+001f and U+007f..U+009f)I 2 min read PHP | IntlChar::isupper() Function The IntlChar::isupper() function is an inbuilt function in PHP which is used to check whether the given input character is an uppercase character or not. Syntax: bool IntlChar::isupper( $codepoint ) Parameters: This function accepts a single parameter $codepoint which is mandatory. The input paramet 2 min read PHP | IntlChar::isdigit() Function The IntlChar::isdigit() function is an inbuilt function in PHP which is used to determine the given input code data is a digited character or not. It returns true when the character is under the general category decimal digit numbers. Beginning with Unicode 4, this is the same as testing for the Num 2 min read Like