3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $startDate = "2014-06-01"; $endDate = "2014-06-30"; $endDate = strtotime($endDate); for($i = strtotime('Monday', strtotime($startDate)); $i <= $endDate; $i = strtotime('+1 week', $i)) echo date('l Y-m-d', $i).'<br>';
Output for 4.3.0 - 7.1.0
Monday 2014-06-02<br>Monday 2014-06-09<br>Monday 2014-06-16<br>Monday 2014-06-23<br>Monday 2014-06-30<br>