mb_chr
PHP 7 >= 7.2.0, PHP 8
mb_chr - Return character by Unicode code point value
mb_chr(
int$codepoint,
[string|null$encoding = null] ): string|false
Returns a string containing the character specified by the Unicode code point value, encoded in the specified encoding.
This function complements mb_ord.
Parameters
- codepoint
-
A Unicode codepoint value, e.g. 128024 for U+1F418 ELEPHANT
- encoding
-
The encoding parameter is the character encoding. If it is omitted or null, the internal character encoding value will be used.
Return Values
A string containing the requested character, if it can be represented in the specified encoding or false on failure.
Changelog
Version | Description |
8.0.0 | encoding is nullable now. |