3v4l.org

run code in 300+ PHP versions simultaneously
<?php $format = 'Y-m-d H:i:s'; $days_left = 7; $dayStart = new DateTime("midnight $daysAgo days ago"); $dayEnd = new DateTime('midnight '.($daysAgo+1).' days ago'); echo $dayStart->format($format); echo $dayEnd->format($format);
Output for git.master, git.master_jit
Warning: Undefined variable $daysAgo in /in/BGIF6 on line 5 Fatal error: Uncaught Exception: Failed to parse time string (midnight days ago) at position 10 (d): The timezone could not be found in the database in /in/BGIF6:5 Stack trace: #0 /in/BGIF6(5): DateTime->__construct('midnight days ...') #1 {main} thrown in /in/BGIF6 on line 5
Process exited with code 255.
Output for rfc.property-hooks
Warning: Undefined variable $daysAgo in /in/BGIF6 on line 5 Fatal error: Uncaught DateMalformedStringException: Failed to parse time string (midnight days ago) at position 10 (d): The timezone could not be found in the database in /in/BGIF6:5 Stack trace: #0 /in/BGIF6(5): DateTime->__construct('midnight days ...') #1 {main} thrown in /in/BGIF6 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:
53.93 ms | 401 KiB | 8 Q