PHP mb_ord() Function Last Updated : 30 Mar, 2023 Comments Improve Suggest changes Like Article Like Report The m_ord() is an inbuilt function in PHP that returns the Unicode code point for the specific character. Syntax: mb_ord(string $string, ?string $encoding = null): int|falseParameters: This function has two parameters: string: This is the string input. It must be a valid string.encoding: The encoding parameter specifies the character encoding. In case if omitted or null, then the internal character encoding value will be utilized.Return value: This function returns the first character Unicode if the function is successfully executed otherwise it will return "false". Example 1: The following code demonstrates the mb_ord() function. PHP <?php $string = '©'; $code_point = mb_ord($string, 'ISO-8859-1'); echo $code_point; ?> Output: 194 Example 2: The following code demonstrates the mb_ord() function. PHP <?php $word = 'Hello'; $code_point = mb_ord($word, 'UTF-8'); if ($code_point === 72) { echo "The first character in the word is 'H'."; } else { echo "The first character in the word is not 'H'."; } ?> Output: The first character in the word is 'H'. Reference: https://www.php.net/manual/en/function.mb-ord.php Comment More infoAdvertise with us Next Article PHP mb_ord() Function neeraj3304 Follow Improve Article Tags : PHP PHP-function PHP-Multibyte-String Similar Reads PHP | gmp_or() Function The gmp_or() is an inbuilt function in PHP which is used to calculate the bitwise OR of two GMP numbers(GNU Multiple Precision : For large numbers). Syntax: gmp_or($num1, $num2) Parameters: This function accepts two GMP numbers, $num1, $num2 as mandatory parameters as shown in the above syntax. Thes 2 min read PHP implode() Function The implode() is a built-in function in PHP and is used to join the elements of an array. implode() is an alias for PHP | join() function and works exactly same as that of join() function.If we have an array of elements, we can use the implode() function to join them all to form one string. We join 2 min read PHP min( ) Function The min() function of PHP is used to find the lowest value in an array, or the lowest value of several specified values. The min() function can take an array or several numbers as an argument and return the numerically minimum value among the passed parameters. The return type is not fixed, it can b 2 min read PHP octdec( ) Function In the earlier days of computing, octal numbers and the octal numbering system was very popular for counting inputs and outputs because as it works in counts of eight, inputs and outputs were in counts of eight, a byte at a time. Due to a wide usage of octal number system many times it happens that 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 mb_parse_str() Function The mb_parse_str() is an inbuilt function in PHP that is used to parse a string into variables. It is very similar to parse_str(). But it operates multibyte characters. Syntax: mb_parse_str($string, $result): boolParameters: This function accepts two parameters that are described below. $string: Inp 1 min read PHP Math Functions PHP is a scripting language that comes with many built-in math functions and constants. These tools help you do basic math, solve more complex problems, and work with different math concepts. This guide gives an overview of PHP's math functions and constants, along with examples, practical uses, and 5 min read PHP key() Function The key() function is an inbuilt function in PHP which is used to return the index of the element of a given array to which the internal pointer is currently pointing. The current element may be starting or next element which depends on the cursor position. By default cursor position is at zero inde 2 min read PHP mb_strstr() Function The mb_strstr() function is an inbuilt function in PHP that finds the first occurrence of a given string in the main string, i.e. it will search for the occurrence of the first needle in haystack, & id found then the portion of the haystack will be returned, otherwise return false. Syntax: mb_st 2 min read PHP list() Function The list() function is an inbuilt function in PHP which is used to assign array values to multiple variables at a time. This function will only work on numerical arrays. When the array is assigned to multiple values, then the first element in the array is assigned to the first variable, second to th 2 min read Like