3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $block = '*'; $pos = strpos($block, '*'); if ($pos !== false) { $num = substr($block, 0, $pos); } $min = int str_pad($num,3,'0'); // 000 -> 0 $max = min(255,str_pad($num,3,'9')); echo $min.'-'.$max;
Output for 5.4.0 - 5.4.11
Parse error: syntax error, unexpected 'str_pad' (T_STRING) in /in/dDSgP on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.21
Parse error: syntax error, unexpected T_STRING in /in/dDSgP on line 8
Process exited with code 255.