Formula for (PHP 3 >= 3.0.9, PHP 4, PHP 5)
string bin2hex ( string str )

Parameter
string str = Required. The string to be converted

Description
The bin2hex() function converts a string of ASCII characters to hexadecimal values. The string can be converted back using the pack() function.

Example


The output of the code :


Returns an ASCII string containing the hexadecimal representation of str. The conversion is done byte-wise with the high-nibble first.