- array_map: documentation ( source)
- implode: documentation ( source)
- str_split: documentation ( source)
- ord: documentation ( source)
- sprintf: documentation ( source)
<?php
echo implode(array_map(function($character) {
// return dechex(ord($character));
return sprintf('%02.x', ord($character));
}, str_split(chr(1) . chr(5))));