3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateStart = new DateTime('2014-01-01'); $dateStart = new DateTime('2014-01-05'); $period = new DatePeriod($dateStart, new DateInterval('P1D'), $dateEnd); $periods = iterator_to_array($period); print_r($periods);
Output for git.master, git.master_jit
Warning: Undefined variable $dateEnd in /in/0Cps6 on line 5 Deprecated: DatePeriod::__construct(): Passing null to parameter #3 ($end) of type int is deprecated in /in/0Cps6 on line 5 Fatal error: Uncaught Exception: DatePeriod::__construct(): Recurrence count must be greater than 0 in /in/0Cps6:5 Stack trace: #0 /in/0Cps6(5): DatePeriod->__construct(Object(DateTime), Object(DateInterval), NULL) #1 {main} thrown in /in/0Cps6 on line 5
Process exited with code 255.
Output for rfc.property-hooks
Warning: Undefined variable $dateEnd in /in/0Cps6 on line 5 Deprecated: DatePeriod::__construct(): Passing null to parameter #3 ($end) of type int is deprecated in /in/0Cps6 on line 5 Fatal error: Uncaught DateMalformedPeriodStringException: DatePeriod::__construct(): Recurrence count must be greater than 0 in /in/0Cps6:5 Stack trace: #0 /in/0Cps6(5): DatePeriod->__construct(Object(DateTime), Object(DateInterval), NULL) #1 {main} thrown in /in/0Cps6 on line 5
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
44.2 ms | 401 KiB | 8 Q