PHP hex2bin() Function

The PHP hex2bin() function is used to decode a hexadecimally encoded binary string. In other words, you can use this function to convert a string of hexadecimal values to ASCII characters. You may also like PHP convert_uuencode() Function and How to count same value in array using php.

Example

<?php
echo hex2bin("48656c6c6f20576f726c6421");
?>

Output

Hello World!

Leave a Reply

Your email address will not be published. Required fields are marked *