PHP hex2bin() Function

The hex2bin() function converts a string of hexadecimal values to ASCII characters.

string hex2bin ( string $data )

Decodes a hexadecimally encoded binary string.

Example -

ParameterDescription
dataHexadecimal representation of data.

Returns the binary representation of the given data or FALSE on failure.