Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

mb_ord

Description

Get Unicode code point of character

Syntax

mb_ord(
    string $string,
    ?string $encoding = null
): int|false

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

The Unicode code point for the first character of string or false on failure.

Examples

1 · string

<?

$string = '🐘';

$return = mb_ord($string);

var_export($return);

?>
128024

2 · encoding

<?

$string = '🐘';
$encoding = 'UTF-8';

$return = mb_ord($string, $encoding);

var_export($return);

?>
128024
HomeMenu