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);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Monday 2014-06-02Monday 2014-06-09Monday 2014-06-16Monday 2014-06-23Monday 2014-06-30