How to convert hexadecimal representation of data to binary data in PHP?

前端 未结 3 1685
闹比i
闹比i 2021-01-04 09:35

I\'m familiar with php\'s function bin2hex() for converting binary data to its hexadecimal representation.

However, what is the complement function to c

3条回答
  •  生来不讨喜
    2021-01-04 09:52

    For those who have PHP 5.4 and above, there's a standard way of doing this:

    The output of the code above should be similar to:

    string(16) "example hex data"

    Gotten off of the PHP hex2bin page.

提交回复
热议问题