3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $usernumber = 18; $myseries = range(0, 59, 5); foreach($myseries as $num) { echo $num.'<br />'; $check = round(18/5) * 5; echo $check; //if($usernumber is close to $num) { // echo 'Matching number is '.$num; //} }
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
0<br />205<br />2010<br />2015<br />2020<br />2025<br />2030<br />2035<br />2040<br />2045<br />2050<br />2055<br />20
Output for 4.3.0 - 4.3.10, 4.4.0 - 4.4.9
<br /> <b>Warning</b>: Wrong parameter count for range() in <b>/in/uk74n</b> on line <b>4</b><br /> <br /> <b>Warning</b>: Invalid argument supplied for foreach() in <b>/in/uk74n</b> on line <b>5</b><br />
Output for 4.3.11
<br /> <b>Warning</b>: Wrong parameter count for range() in <b>/in/uk74n</b> on line <b>4</b><br />