<?php
string|false hex2bin ( string $string )
where,
$string = The hexadecimal representation of data
?>
<?php
$hex01 = '47efbfbd2e70efbfbdefbfbd381f5f0eefbfbdefbfbd';
$hex2bin01 = hex2bin($hex01);
echo $hex2bin01;
?>
<?php
$hex02 = '313031303131303130313131303030';
$hex2bin02 = hex2bin($hex02);
echo $hex2bin02;
?>
<?php
$hex03 = '4561737920636f6d652c206561737920676f2e';
$hex2bin03 = hex2bin($hex03);
echo $hex2bin03;
?>
<?php
var_dump(bin2hex(hex2bin('012345')) == '012345');
echo '<br><br>';
var_dump(bin2hex(hex2bin('abc123')) == 'abc123');
echo '<br><br>';
var_dump(bin2hex(hex2bin('123abc')) == '123abc');
echo '<br><br>';
var_dump(bin2hex(hex2bin('FFFFFF')) == 'ffffff');
?>
<?php
var_dump(hex2bin('SATOR'));
ECHO '<br><br>';
var_dump(hex2bin('ROTAS'));
?>