The bin2hex() function converts a string of ASCII characters to hexadecimal values. The string can be converted back using the pack() function.
Example
$str = bin2hex("Hello World!");
echo($str);
Output
48656c6c6f20576f726c6421
The bin2hex() function converts a string of ASCII characters to hexadecimal values. The string can be converted back using the pack() function.
Example
$str = bin2hex("Hello World!");
echo($str);
Output
48656c6c6f20576f726c6421