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 "<br>".$check."--"; else echo max(myseries);
Output for 5.3.0 - 5.6.21, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
<br>190-- Notice: Use of undefined constant myseries - assumed 'myseries' in /in/QDR5K on line 13 Warning: max(): When only one parameter is given, it must be an array in /in/QDR5K on line 13
Output for 5.0.0 - 5.2.17
<br>190-- Notice: Use of undefined constant myseries - assumed 'myseries' in /in/QDR5K on line 13 Warning: Wrong parameter count for max() in /in/QDR5K on line 13
Output for 4.3.2 - 4.4.9
Warning: Wrong parameter count for range() in /in/QDR5K on line 4 Warning: Wrong parameter count for range() in /in/QDR5K on line 6 <br>190-- Warning: in_array(): Wrong datatype for second argument in /in/QDR5K on line 10 Notice: Use of undefined constant myseries - assumed 'myseries' in /in/QDR5K on line 13 Warning: Wrong parameter count for max() in /in/QDR5K on line 13
Output for 4.3.0 - 4.3.1
Warning: Wrong parameter count for range() in /in/QDR5K on line 4 Warning: Wrong parameter count for range() in /in/QDR5K on line 6 <br>190-- Warning: in_array() [http://www.php.net/function.in-array]: Wrong datatype for second argument in /in/QDR5K on line 10 Notice: Use of undefined constant myseries - assumed 'myseries' in /in/QDR5K on line 13 Warning: Wrong parameter count for max() in /in/QDR5K on line 13