Convert "Hello World!" to hexadecimal values:
The bin2hex() function converts a string of ASCII characters to hexadecimal values. The string can be converted back using the pack() function.
Parameter | Description |
---|---|
string | Required. The string to be converted |
Return Value: | Returns the hexadecimal value of the converted string |
---|---|
PHP Version: | 4+ |
Convert a string value from binary to hex and back: