The IntlChar getBlockCode() function is used to get the Unicode allocation block containing the value val.
IntlChar::getBlockCode (val)
val - 一个作为UTF-8字符串编码的整数或字符。
IntlChar getBlockCode()函数返回val的块值。以下是列表 -
IntlChar::BLOCK_CODE_BASIC_LATIN
立即学习“PHP免费学习笔记(深入)”;
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)
以上就是在PHP中,IntlChar getBlockCode()函数的翻译如下:的详细内容,更多请关注php中文网其它相关文章!
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号