3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = new DateTime('2013-09-09 12:00:15'); # $start->setTimestamp($from); if $from is timestamp $end = new DateTime('now'); $iso = $start->format(DateTime::W3C) . '/' . $end->format(DateTime::W3C) . '/P1D'; #$iso = 'R2/2013-09-09T12:00:15Z/P1D'; var_dump($iso); $periods = new DatePeriod($iso);
Output for git.master, git.master_jit
string(55) "2013-09-09T12:00:15+02:00/2013-11-08T14:14:24+01:00/P1D" Fatal error: Uncaught Exception: Unknown or bad format (2013-09-09T12:00:15+02:00/2013-11-08T14:14:24+01:00/P1D) in /in/9ghU8:10 Stack trace: #0 /in/9ghU8(10): DatePeriod->__construct('2013-09-09T12:0...') #1 {main} thrown in /in/9ghU8 on line 10
Process exited with code 255.
Output for rfc.property-hooks
string(55) "2013-09-09T12:00:15+02:00/2013-11-08T14:14:24+01:00/P1D" Fatal error: Uncaught DateMalformedPeriodStringException: Unknown or bad format (2013-09-09T12:00:15+02:00/2013-11-08T14:14:24+01:00/P1D) in /in/9ghU8:10 Stack trace: #0 /in/9ghU8(10): DatePeriod->__construct('2013-09-09T12:0...') #1 {main} thrown in /in/9ghU8 on line 10
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:
36.19 ms | 401 KiB | 8 Q