当前位置: 首页> 函数类别大全> hex2bin

hex2bin

转换十六进制字符串为二进制字符串
名称:hex2bin
分类:字符串
所属语言:php
一句话介绍:把十六进制值的字符串转换为 ASCII 字符。

实例

把十六进制值转换为 ASCII 字符:

<span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">hex2bin</span><span class="token punctuation">(</span><span class="token string double-quoted-string">"48656c6c6f20576f726c6421"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

亲自试一试

同类函数
  • 转义元字符集 quotemeta

    quotemeta

    转义元字符集
  • 返回格式化的字符串 vsprintf

    vsprintf

    返回格式化的字符串
  • strstr的别名 strchr

    strchr

    strstr的别名
  • 计算指定字符串在目标字符串中最后一次出现的位置(不区分大小写) strripos

    strripos

    计算指定字符串在目标字符串中最后一次出现
  • 二进制安全比较字符串(从偏移位置比较指定长度) substr_compare

    substr_compare

    二进制安全比较字符串(从偏移位置比较指定
  • 反转一个字符串 strrev

    strrev

    反转一个字符串
  • 将字符串转化为小写 strtolower

    strtolower

    将字符串转化为小写
  • 使用反斜线转义字符串 addslashes

    addslashes

    使用反斜线转义字符串