3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php foreach (range(0, 20, 5) as $x) { echo ($x == 0 ? 1 : $x), '<br>'; }
based on QLv7t
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
1<br>5<br>10<br>15<br>20<br>
Output for 4.3.0 - 4.3.10, 4.4.0 - 4.4.9
Warning: Wrong parameter count for range() in /in/tKPJC on line 2 Warning: Invalid argument supplied for foreach() in /in/tKPJC on line 2
Output for 4.3.11
Warning: Wrong parameter count for range() in /in/tKPJC on line 2