PHP hex2bin() 函数
PHP 教程
· 2019-01-29 14:11:35
实例
把十六进制值转换为 ASCII 字符:
<?php
echo hex2bin("48656c6c6f20576f726c6421");
?>
echo hex2bin("48656c6c6f20576f726c6421");
?>
以上实例输出结果:
Hello World!
定义和用法
hex2bin() 函数把十六进制值的字符串转换为 ASCII 字符。
语法
hex2bin(string)
| 参数 | 描述 |
|---|---|
| string | 必需。要转换的十六进制值。 |
技术细节
| 返回值: | 返回转换字符串的 ASCII 字符,如果失败则返回 FALSE。 |
|---|---|
| PHP 版本: | 5.4.0+ |
| 更新日志: | 自 PHP 5.4.1 起,如果字符串长度为奇数,则抛出一个警告。在 PHP 5.4.0 中,奇数字符串被默默接受,但是最后一个字节会被移除。 自 PHP 5.5.1 起,如果字符串是无效的十六进制字符串,则抛出一个警告。 |
点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html
Design systems
Not all design systems are equally effective. Some can generate coherent user experiences, others produce confusing patchwork designs. Some inspire teams to contribute to them, others are neglected. S......一起来看看 《Design systems》 这本书的介绍吧!