Syntax of bin2hex
string bin2hex(string binary)
Converts binary to a hexadecimal (base-16) value. Up to a 32-bit number, or 2,147,483,647 decimal, can be converted
Example of bin2hex
<?php
$str = bin2hex("Hello World!");
echo($str);
?>
48656c6c6f20576f726c6421