
The IntlChar getBlockCode() function is used to get the Unicode allocation block containing the value val.
Syntax
IntlChar::getBlockCode (val)
参数
val - 一个作为UTF-8字符串编码的整数或字符。
返回值
IntlChar getBlockCode()函数返回val的块值。以下是列表 -
-
IntlChar::BLOCK_CODE_BASIC_LATIN
立即学习“PHP免费学习笔记(深入)”;
IntlChar::BLOCK_CODE_GREEK
IntlChar::BLOCK_CODE_MISCELLANEOUS_SYMBOLS
示例
以下是一个示例 -
";
var_dump(IntlChar::getBlockCode("PQRS") === IntlChar::BLOCK_CODE_BASIC_LATIN);
echo "
";
var_dump(IntlChar::getBlockCode("u{2603}") === IntlChar::BLOCK_CODE_MISCELLANEOUS_SYMBOLS);
?>输出
以下是输出 −
bool(true) bool(false) bool(false)











