3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $weekDate = new DateTime('- 1 week'); echo $weekDate->format('Y-m-d')."\n"; for($i=0;$i<8;$i++) { $future = new DateTime('+ 1 days'); echo $future->format('Y-m-d')."\n"; }
based on 3IQ6b
Output for 5.5.0 - 7.3.0
2016-06-19 2016-06-27 2016-06-27 2016-06-27 2016-06-27 2016-06-27 2016-06-27 2016-06-27 2016-06-27