- var_dump: documentation ( source)
- hex2bin: documentation ( source)
- bin2hex: documentation ( source)
<?php
function encode($to_encode){ return (bin2hex($to_encode)); }
function decode($numberstr){ return hex2bin(($numberstr)); }
$str="the quick brown fox jumps over the lazy dog こどものじかん";
var_dump($str,encode($str),decode(encode($str)));