bin2hex

Convert binary data into hexadecimal representation

Syntax

bin2hex(string $string): string

Parameters

string

A string.

Return

Returns the hexadecimal representation of the given string.

Examples

<?

$string = 'data';

$return = bin2hex($string);

echo $return;

?>
64617461

Internal

hex2bin

External

PHP

Home Menu