<?php
// Everything you enter here will be executed by our servers. Try it!
$now = new \DateTime();
$interval = new \DateInterval('P1M');
$period = new\DatePeriod($now->add($interval), $interval, 4);
foreach($period as $date){
echo $date->format('F') . "<br/>";
}
Fatal error: Uncaught Error: Call to undefined function new\DatePeriod() in /in/2LVlc:6
Stack trace:
#0 {main}
thrown in /in/2LVlc on line 6
Process exited with code 255.
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2LVlc on line 4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2LVlc on line 5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2LVlc on line 6
Fatal error: Class 'DateInterval' not found in /in/2LVlc on line 5
Process exited with code 255.
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2LVlc on line 4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2LVlc on line 5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2LVlc on line 6
Fatal error: Class 'DateTime' not found in /in/2LVlc on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2LVlc on line 4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2LVlc on line 5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2LVlc on line 6
Fatal error: Cannot instantiate non-existent class: datetime in /in/2LVlc on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2LVlc on line 4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2LVlc on line 5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/2LVlc on line 6
Fatal error: Cannot instantiate non-existent class: datetime in /in/2LVlc on line 4