bin2hex

Syntax: string bin2hex ( string $str ) Description: Returns an ASCII string containing the hexadecimal representation of str. Note: Using addcslashes() function we can configure the escaped string.

Example


<?php
$str="good morning";
echo bin2hex($str);
?>
OUTPUT

676f6f64206d6f726e696e67