3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $startDate = "2014-06-01"; $endDate = "2014-06-30"; $startDate = strtotime($startDate); $endDate = strtotime($endDate); for($i = strtotime('Monday', $startDate); $i <= $endDate; $i = strtotime('+1 week', $i)) echo date('l Y-m-d', $i).PHP_EOL;
based on 0N5HN
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.6.30, hhvm-3.10.1 - 3.17.3, 7.0.0 - 7.2.0
Monday 2014-06-02 Monday 2014-06-09 Monday 2014-06-16 Monday 2014-06-23 Monday 2014-06-30
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/n4ULA on line 9 Monday 2014-06-02PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/n4ULA on line 9 Monday 2014-06-09PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/n4ULA on line 9 Monday 2014-06-16PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/n4ULA on line 9 Monday 2014-06-23PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/n4ULA on line 9 Monday 2014-06-30PHP_EOL