3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($x=1;$x<24;$x++) { #var_dump($x / 2); $bla= round_up($x /2,0); echo $bla."\n"; } function round_up($number, $precision = 2){ $fig = (int) str_pad('1', $precision, '0'); return (ceil($number * $fig) / $fig); } ?>
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.22, 8.2.0 - 8.2.9
Parse error: syntax error, unexpected variable "$precision ", expecting ")" in /in/NXMNF on line 10
Process exited with code 255.
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Parse error: syntax error, unexpected '$precision ' (T_VARIABLE), expecting ')' in /in/NXMNF on line 10
Process exited with code 255.
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34
Parse error: syntax error, unexpected '$precision ' (T_VARIABLE), expecting ',' or ')' in /in/NXMNF on line 10
Process exited with code 255.
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
Parse error: syntax error, unexpected '$precision ' (T_VARIABLE) in /in/NXMNF on line 10
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected T_VARIABLE in /in/NXMNF on line 10
Process exited with code 255.

preferences:
375.87 ms | 1386 KiB | 395 Q