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