3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $start = new DateTime('2013-11-07'); $end = new DateTime('2013-12-31'); $weeks = array(); while ($start < $end) { $weeks[] = $start->format('d-m-Y'); $start->modify('+1 week'); } print_r($weeks);