mb_ord
PHP 7 >= 7.2.0, PHP 8
mb_ord - Get Unicode code point of character
mb_ord(
string$string,
[string|null$encoding = null] ): int|false
Returns the Unicode code point value of the given character.
This function complements mb_chr.
Parameters
- string
-
A string
- encoding
-
The encoding parameter is the character encoding. If it is omitted or null, the internal character encoding value will be used.
Return Values
The Unicode code point for the first character of string or false on failure.
Changelog
Version | Description |
8.0.0 | encoding is nullable now. |