(PHP 7, PHP 8)
IntlChar::getBlockCode — Renvoie le bloc d'allocation Unicode contenant un point de code
Renvoie le bloc d'allocation Unicode contenant le caractère.
Renvoie la valeur du bloc pour codepoint.
Voir les constantes IntlChar::BLOCK_CODE_* pour les valeurs de retour possibles. Renvoie null en cas d'échec.
Exemple #1 Test de différents codepoint
<?php
var_dump(IntlChar::getBlockCode("A") === IntlChar::BLOCK_CODE_BASIC_LATIN);
var_dump(IntlChar::getBlockCode("Φ") === IntlChar::BLOCK_CODE_GREEK);
var_dump(IntlChar::getBlockCode("\u{2603}") === IntlChar::BLOCK_CODE_MISCELLANEOUS_SYMBOLS);
?>L'exemple ci-dessus va afficher :
bool(true) bool(true) bool(true)