Hex Encode and Decode using PHP

bin2hex and hex2bin functions

<?php

$text = 'Hello';
$hexStr = bin2hex($text);
echo $hexStr.PHP_EOL;

$text = hex2bin($hexStr);
echo $text.PHP_EOL;

Leave a Comment

Cancel reply

Your email address will not be published.