The hex2bin() function decodes a hexadecimally encoded binary string.
PHP hex2bin() Function has the following syntax.
hex2bin(string)
Parameter | Is Required | Description |
---|---|---|
string | Required. | The hexadecimal value to be converted |
PHP hex2bin() Function returns the encoded binary string, or FALSE on failure.
decodes a hexadecimally encoded binary string:
<?php
echo hex2bin("1231FFF23123");
?>