3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sourceId = '10131'; $idString = str_pad(strrev((string)$sourceId), 3, '0'); echo "/{$type}/" . substr($idString, 0, 2) . '/' . substr($idString, 2) . '/';

preferences:
36.45 ms | 402 KiB | 5 Q