← All built-ins / hex2bin()

hex2bin()

hex2bin(string $s): string

Parameters

NameTypeDescription
$sstringhex string (even length)

Return value

The decoded raw bytes.

Example

echo hex2bin("486f6c79");
Holy

See also

bin2hex()