3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $range = range(strtotime("today 00:15"),strtotime("today 04:00"),15*60); foreach($range as $time){ echo '<option value="'.$time.'">'.date("H:i",$time).'</option>'."\r\n"; }
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
<option value="1404857700">00:15</option> <option value="1404858600">00:30</option> <option value="1404859500">00:45</option> <option value="1404860400">01:00</option> <option value="1404861300">01:15</option> <option value="1404862200">01:30</option> <option value="1404863100">01:45</option> <option value="1404864000">02:00</option> <option value="1404864900">02:15</option> <option value="1404865800">02:30</option> <option value="1404866700">02:45</option> <option value="1404867600">03:00</option> <option value="1404868500">03:15</option> <option value="1404869400">03:30</option> <option value="1404870300">03:45</option> <option value="1404871200">04:00</option>
Output for 4.3.0 - 4.3.10, 4.4.0 - 4.4.9
Warning: Wrong parameter count for range() in /in/BAlMh on line 3 Warning: Invalid argument supplied for foreach() in /in/BAlMh on line 4
Output for 4.3.11
Warning: Wrong parameter count for range() in /in/BAlMh on line 3