3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $month = "05"; $year = "2014"; $start_date = "01-".$month."-".$year; $start_time = strtotime($start_date); $end_time = strtotime("+1 month", $start_time); for($i=$start_time; $i<=$end_time; $i+=86400) { $list[] = date('Y-m-d-D', $i); } print_r($list);
Output for 5.1.3 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => 2014-05-01-Thu [1] => 2014-05-02-Fri [2] => 2014-05-03-Sat [3] => 2014-05-04-Sun [4] => 2014-05-05-Mon [5] => 2014-05-06-Tue [6] => 2014-05-07-Wed [7] => 2014-05-08-Thu [8] => 2014-05-09-Fri [9] => 2014-05-10-Sat [10] => 2014-05-11-Sun [11] => 2014-05-12-Mon [12] => 2014-05-13-Tue [13] => 2014-05-14-Wed [14] => 2014-05-15-Thu [15] => 2014-05-16-Fri [16] => 2014-05-17-Sat [17] => 2014-05-18-Sun [18] => 2014-05-19-Mon [19] => 2014-05-20-Tue [20] => 2014-05-21-Wed [21] => 2014-05-22-Thu [22] => 2014-05-23-Fri [23] => 2014-05-24-Sat [24] => 2014-05-25-Sun [25] => 2014-05-26-Mon [26] => 2014-05-27-Tue [27] => 2014-05-28-Wed [28] => 2014-05-29-Thu [29] => 2014-05-30-Fri [30] => 2014-05-31-Sat [31] => 2014-06-01-Sun )
Output for 5.1.0 - 5.1.2
Array ( [0] => 1970-01-01-Thu )
Output for 4.3.0 - 5.0.5
Array ( [0] => 2006-11-04-Sat [1] => 2006-11-05-Sun [2] => 2006-11-06-Mon [3] => 2006-11-07-Tue [4] => 2006-11-08-Wed [5] => 2006-11-09-Thu [6] => 2006-11-10-Fri [7] => 2006-11-11-Sat [8] => 2006-11-12-Sun [9] => 2006-11-13-Mon [10] => 2006-11-14-Tue [11] => 2006-11-15-Wed [12] => 2006-11-16-Thu [13] => 2006-11-17-Fri [14] => 2006-11-18-Sat [15] => 2006-11-19-Sun [16] => 2006-11-20-Mon [17] => 2006-11-21-Tue [18] => 2006-11-22-Wed [19] => 2006-11-23-Thu [20] => 2006-11-24-Fri [21] => 2006-11-25-Sat [22] => 2006-11-26-Sun [23] => 2006-11-27-Mon [24] => 2006-11-28-Tue [25] => 2006-11-29-Wed [26] => 2006-11-30-Thu [27] => 2006-12-01-Fri [28] => 2006-12-02-Sat [29] => 2006-12-03-Sun [30] => 2006-12-04-Mon )