hex2bin

Decodes a hexadecimally encoded binary string

Syntax

hex2bin(string $string): string|false

Parameters

data

Hexadecimal representation of data.

Return

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

Examples

<?

$data = '64617461';

$return = hex2bin($data);

echo $return;

?>
data

Internal

bin2hex

External

PHP

Home Menu