3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $start = "11:00"; $end = "13:30"; $tStart = strtotime($start); $tEnd = strtotime($end); $tNow = $tStart; while($tNow <= $tEnd){ echo date("H:i",$tNow)."\n"; $tNow = strtotime('+30 minutes',$tNow); } ?>
Output for 5.3.0 - 7.1.0
11:00 11:30 12:00 12:30 13:00 13:30