3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $i = 0;$d= new DatePeriod(new DateTime(),DateInterval::createFromDateString("Monday"), new DateTime("2014-11-31")); foreach($d as $day){ if($i++ > 20) break; echo $day->format("c").PHP_EOL;}
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
2014-10-21T14:55:10+02:00 2014-10-27T14:55:10+01:00 2014-10-27T14:55:10+01:00 2014-10-27T14:55:10+01:00 2014-10-27T14:55:10+01:00 2014-10-27T14:55:10+01:00 2014-10-27T14:55:10+01:00 2014-10-27T14:55:10+01:00 2014-10-27T14:55:10+01:00 2014-10-27T14:55:10+01:00 2014-10-27T14:55:10+01:00 2014-10-27T14:55:10+01:00 2014-10-27T14:55:10+01:00 2014-10-27T14:55:10+01:00 2014-10-27T14:55:10+01:00 2014-10-27T14:55:10+01:00 2014-10-27T14:55:10+01:00 2014-10-27T14:55:10+01:00 2014-10-27T14:55:10+01:00 2014-10-27T14:55:10+01:00 2014-10-27T14:55:10+01:00
Output for 5.0.0 - 5.2.17
Fatal error: Class 'DatePeriod' not found in /in/TtB9R on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: dateperiod in /in/TtB9R on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: dateperiod in /in/TtB9R on line 2