- chunk_split: documentation ( source)
- strtoupper: documentation ( source)
- dechex: documentation ( source)
- strrev: documentation ( source)
<?php
$BaseID = '1234567890';
$BaseIDHex = dechex($BaseID);
$BaseIDHex = strtoupper(strrev($BaseIDHex));
$BaseIDHex = chunk_split($BaseIDHex, 2, ' ');
echo $BaseIDHex;