array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'fr', ), 'this' => array ( 0 => 'intlchar.ord.php', 1 => 'IntlChar::ord', ), 'up' => array ( 0 => 'class.intlchar.php', 1 => 'IntlChar', ), 'prev' => array ( 0 => 'intlchar.isxdigit.php', 1 => 'IntlChar::isxdigit', ), 'next' => array ( 0 => 'intlchar.tolower.php', 1 => 'IntlChar::tolower', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/intl/intlchar/ord.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 7, PHP 8)
IntlChar::ord — Return Unicode code point value of character
Returns the Unicode code point value of the given character.
This function complements IntlChar::chr().
character
La valeur codepoint de type entier
(i.e. 0x2603
pour U+2603 SNOWMAN), ou le caractère encodé en UTF-8 de type chaîne de caractères
(i.e. "\u{2603}"
)
Returns the Unicode code point value as an integer.
Exemple #1 Test de différents codepoint
<?php
var_dump(IntlChar::ord("A"));
var_dump(IntlChar::ord(" "));
var_dump(IntlChar::ord("\u{2603}"));
?>
L'exemple ci-dessus va afficher :
int(65) int(32) int(9731)