The bin2hex() function used to convert binary data into hexadecimal representation, and returns an ASCII string containing the hexadecimal representation
bin2hex ( string $string ) : string
Parameter Name | Descrption |
---|---|
$string | Required, The input string. |
Return the hexadecimal representation of string.
echo bin2hex("Test String"); //Output :: 5465737420537472696e67
Related Functions