The bin2hex() function used to Convert binary data into hexadecimal representation
Returns an ASCII string containing the hexadecimal representation of string
. The conversion is done byte-wise with the high-nibble first.
Syntax
bin2hex(string)
Parameter Values
string : The string to be converted.
Technical Details
Return Value : Returns the hexadecimal value of the converted string.
PHP Version : 4+
Examples
<?php
$str = "Codeamend Team";
echo bin2hex($str) . "<br>";
echo pack("H*",bin2hex($str)) . "<br>";
?>
Output :
436f6465616d656e64205465616d
Codeamend Team
Read More details : https://www.php.net/manual/en/function.bin2hex.php
Total Views: 1,336