Returns an ASCII string containing the hexadecimal representation of string. The conversion is done byte-wise with the high-nibble first. Test bin2hex online.
string bin2hex ( string $str )
PHP Documentation by the PHP Documentation Group
(PHP 4, PHP 5, PHP 7, PHP 8)
bin2hex — Convert binary data into hexadecimal representation
$string
) : string
Returns an ASCII string containing the hexadecimal representation
of string
. The conversion is done byte-wise
with the high-nibble first.
string
A string.
Returns the hexadecimal representation of the given string.
Copyright © 1997 - 2016 by the PHP Documentation Group. This material may be distributed only subject to the terms and conditions set forth in the Creative Commons Attribution 3.0 License or later. A copy of the Creative Commons Attribution 3.0 license is distributed with this manual. The latest version is presently available at » http://creativecommons.org/licenses/by/3.0/.