3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startDate = "2009-10-11"; $endDate = "2010-01-20"; $dates = array(); $temp = strtotime($startDate); do { $dates[] = date("Y-m-d", $temp); $temp = strtotime("+1 week", $temp); } while ($temp < strtotime($endDate)); print_r($dates);

preferences:
67.22 ms | 402 KiB | 5 Q