The IntlChar getBlockCode() function is used to get the Unicode allocation block containing the value val.
IntlChar::getBlockCode (val)
val - An integer or character encoded as a UTF-8 string.
IntlChar getBlockCode() function returns the block value of val. Here is the list -
IntlChar::BLOCK_CODE_BASIC_LATIN
IntlChar::BLOCK_CODE_GREEK
IntlChar: :BLOCK_CODE_MISCELLANEOUS_SYMBOLS
<?php var_dump(IntlChar::getBlockCode("A") === IntlChar::BLOCK_CODE_BASIC_LATIN); echo "<br>"; var_dump(IntlChar::getBlockCode("PQRS") === IntlChar::BLOCK_CODE_BASIC_LATIN); echo "<br>"; var_dump(IntlChar::getBlockCode("u{2603}") === IntlChar::BLOCK_CODE_MISCELLANEOUS_SYMBOLS); ?>
bool(true) bool(false) bool(false)
The above is the detailed content of In PHP, the translation of the IntlChar getBlockCode() function is as follows:. For more information, please follow other related articles on the PHP Chinese website!