3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $step = 5; $usernumber = 188; $myseries = range(0, 59, $step); $myseries = range(0, 59, 5); $check = round($usernumber/$step) * $step; echo "<br>".$check; if(in_array($check,$myseries)) echo "\n".$check; else echo max($myseries);
Output for 5.0.0 - 7.1.0
<br>19055
Output for 4.3.2 - 4.4.9
Warning: Wrong parameter count for range() in /in/qfjSp on line 4 Warning: Wrong parameter count for range() in /in/qfjSp on line 6 <br>190 Warning: in_array(): Wrong datatype for second argument in /in/qfjSp on line 10 Warning: Wrong parameter count for max() in /in/qfjSp on line 13
Output for 4.3.0 - 4.3.1
Warning: Wrong parameter count for range() in /in/qfjSp on line 4 Warning: Wrong parameter count for range() in /in/qfjSp on line 6 <br>190 Warning: in_array() [http://www.php.net/function.in-array]: Wrong datatype for second argument in /in/qfjSp on line 10 Warning: Wrong parameter count for max() in /in/qfjSp on line 13