3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $period2 = new DatePeriod( new DateTime('-3 months'), DateInterval::createFromDateString('first day of next month'), new DateTime('NOW') ); $months = array(); $day = array(); foreach ($period2 as $p) $day[] = strftime('%A', $p->getTimestamp()); echo $day; ?>
Output for 5.4.0 - 7.2.0
Notice: Array to string conversion in /in/oZgHX on line 16 Array
Output for 5.3.0 - 5.3.29
Array
Output for 5.0.0 - 5.2.17
Fatal error: Class 'DatePeriod' not found in /in/oZgHX on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: dateperiod in /in/oZgHX on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: dateperiod in /in/oZgHX on line 3