3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $usernumber = 18; $myseries = range(0, 59, 5); foreach($myseries as $num) { echo $num.'<br />'; //if($usernumber is close to $num) { // echo 'Matching number is '.$num; //} }
Output for 5.0.0 - 7.2.0
0<br />5<br />10<br />15<br />20<br />25<br />30<br />35<br />40<br />45<br />50<br />55<br />
Output for 4.3.0 - 4.3.10, 4.4.0 - 4.4.9
Warning: Wrong parameter count for range() in /in/VBV60 on line 3 Warning: Invalid argument supplied for foreach() in /in/VBV60 on line 4
Output for 4.3.11
Warning: Wrong parameter count for range() in /in/VBV60 on line 3