PHP | IntlChar getNumericValue() Function Last Updated : 27 Aug, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report The IntlChar::getNumericValue() function is an inbuilt function in PHP which is used to get the numeric value for a Unicode code point as defined in the Unicode Character Database. Syntax: float IntlChar::getNumericValue( $codepoint ) Parameters: This function accepts a single parameter $codepoint which is mandatory. The input parameter is a character, which is encoded as a UTF-8 string. Return Value: This function returns the numeric value of codepoint on success, or IntlChar::NO_NUMERIC_VALUE if none is defined. Below programs illustrate the IntlChar::getNumericValue() function in PHP: Example 1: php <?php // PHP program to illustrate the use of // IntlChar::getNumericValue() Function // Input int codepoint value var_dump(IntlChar::getNumericValue("2")); // Input int codepoint value var_dump(IntlChar::getNumericValue("4")); // Input char codepoint value var_dump(IntlChar::getNumericValue("G")); // Input string codepoint value var_dump(IntlChar::getNumericValue("Geeks")); // Input Symbolic codepoint value var_dump(IntlChar::getNumericValue("$")); // Input Symbolic codepoint value var_dump(IntlChar::getNumericValue("\u{216C}")); // Input Symbolic codepoint value var_dump(IntlChar::getNumericValue("\u{216F}")); ?> Output: float(2) float(4) float(-123456789) NULL float(-123456789) float(50) float(1000) Example 2: php <?php // PHP program to illustrate the use of // IntlChar::getNumericValue() Function // Declare an array with // different codepoint value $arr = array("4", "1", "Geeks", "\u{216C}", "\u{216F}", 65, ); // For loop condition to check // each character through function foreach ($arr as $val) { // Check each element as code point data var_dump(IntlChar::getNumericValue($val)); } ?> Output: float(4) float(1) NULL float(50) float(1000) float(-123456789) Reference: http://php.net/manual/en/intlchar.getnumericvalue.php Comment More infoAdvertise with us Next Article PHP | IntlChar getIntPropertyValue() Function V vijay_raj Follow Improve Article Tags : Web Technologies PHP Similar Reads PHP | IntlChar getIntPropertyValue() Function The IntlChar::getIntPropertyValue() function is an inbuilt function in PHP which is used to get the value for Unicode property for a code point.Syntax: int IntlChar::getIntPropertyValue( $codepoint, $property ) Parameter: This function accepts two parameters as mentioned above and described below: $ 2 min read PHP | IntlChar getIntPropertyMinValue() Function The IntlChar::getIntPropertyMinValue() function is an inbuilt function in PHP which is used to get the minimum value for a Unicode property. This could be used to access the information as well as manipulating the Unicode characters. For an enumerated/integer/binary Unicode property, this is going t 1 min read PHP | IntlChar getIntPropertyMaxValue() Function The IntlChar::getIntPropertyMaxValue() function is an inbuilt function in PHP which is used to get the maximum value for a Unicode property. This could be used to access the information as well as manipulating the Unicode character. For an enumerated/integer/binary Unicode property, this is going to 1 min read PHP | IntlChar getPropertyValueEnum() Function The IntlChar getPropertyValueEnum() function is an inbuilt function in PHP which is used to get the property value form the given value. Syntax: int IntlChar::getPropertyValueEnum( $property, $name ) Parameters: This function accepts two parameters as mentioned above and described below: $property: 1 min read PHP | IntlChar getPropertyValueName() Function The IntlChar::getPropertyValueName() function is an inbuilt function in PHP which is used to get the Unicode name for a property value. It will be according to the data present in PropertyValueAliases.txt, which is the Unicode DataBase file. Syntax: string IntlChar::getPropertyValueName( $property, 2 min read PHP | IntlChar getUnicodeVersion() Function The IntlChar::getUnicodeVersion() function is an inbuilt function in PHP which is used to get the Unicode version. The Unicode standard version information is filled into an array. For example, Unicode version 2.2.1 is represented as an array with the values [2, 2, 1, 0]. Syntax: array IntlChar::get 1 min read Like