3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $start = strtotime('00:00'); $end = strtotime('23:00'); $range = array(); while ($start !== $end) { $start = strtotime('+1 hour',$start); $range[] = date('h:ia', $start); } print_r($range);
Output for 4.3.0 - 4.4.9, 5.0.3 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => 01:00am [1] => 02:00am [2] => 03:00am [3] => 04:00am [4] => 05:00am [5] => 06:00am [6] => 07:00am [7] => 08:00am [8] => 09:00am [9] => 10:00am [10] => 11:00am [11] => 12:00pm [12] => 01:00pm [13] => 02:00pm [14] => 03:00pm [15] => 04:00pm [16] => 05:00pm [17] => 06:00pm [18] => 07:00pm [19] => 08:00pm [20] => 09:00pm [21] => 10:00pm [22] => 11:00pm )
Output for 5.0.0 - 5.0.2

Process exited with code 137.