3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $sourceId = '10131'; $idString = str_pad(strrev((string)$sourceId), 3, '0'); echo "/{$type}/" . substr($idString, 0, 2) . '/' . substr($idString, 2) . '/';
Output for 5.0.4 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined variable: type in /in/9QG18 on line 4 //13/101/
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: type in /in/9QG18 on line 4 //13/101/