3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $step = 5; $usernumber = 18; $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.0.0 - 5.6.21, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
<br>20--<br>20--
Output for 4.4.3 - 4.4.9
<br /> <b>Warning</b>: Wrong parameter count for range() in <b>/in/cfLva</b> on line <b>4</b><br /> <br /> <b>Warning</b>: Wrong parameter count for range() in <b>/in/cfLva</b> on line <b>6</b><br /> <br>20--<br /> <b>Warning</b>: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in <b>/in/cfLva</b> on line <b>10</b><br /> <br /> <b>Warning</b>: Wrong parameter count for max() in <b>/in/cfLva</b> on line <b>13</b><br />
Output for 4.3.2 - 4.4.2
<br /> <b>Warning</b>: Wrong parameter count for range() in <b>/in/cfLva</b> on line <b>4</b><br /> <br /> <b>Warning</b>: Wrong parameter count for range() in <b>/in/cfLva</b> on line <b>6</b><br /> <br>20--<br /> <b>Warning</b>: in_array(): Wrong datatype for second argument in <b>/in/cfLva</b> on line <b>10</b><br /> <br /> <b>Warning</b>: Wrong parameter count for max() in <b>/in/cfLva</b> on line <b>13</b><br />
Output for 4.3.0 - 4.3.1
<br /> <b>Warning</b>: Wrong parameter count for range() in <b>/in/cfLva</b> on line <b>4</b><br /> <br /> <b>Warning</b>: Wrong parameter count for range() in <b>/in/cfLva</b> on line <b>6</b><br /> <br>20--<br /> <b>Warning</b>: in_array() [<a href='http://www.php.net/function.in-array'>function.in-array</a>]: Wrong datatype for second argument in <b>/in/cfLva</b> on line <b>10</b><br /> <br /> <b>Warning</b>: Wrong parameter count for max() in <b>/in/cfLva</b> on line <b>13</b><br />