3v4l.org

run code in 300+ PHP versions simultaneously
<?php $id = 123456; $len = strlen($id); $input = "AHD"; $final_len = 6-$len; echo $final_len.">>".str_pad($input, $final_len, "0", STR_PAD_RIGHT).$id;

preferences:
31.09 ms | 402 KiB | 5 Q