3v4l.org

run code in 300+ PHP versions simultaneously
<?php $original_timezone = new DateTimeZone('UTC'); $datetime = new DateTime('06-01-2016 19:00 UTC', $original_timezone); $target_timezone = new DateTimeZone('EDT'); $datetime->setTimeZone($target_timezone); $triggerOn = $datetime->format('Y-m-d h:i:s T P'); echo $triggerOn; echo timezone_offset_get($target_timezone,$triggerOn);
Output for git.master, git.master_jit, rfc.property-hooks
2016-01-06 03:00:00 EDT -04:00 Fatal error: Uncaught TypeError: timezone_offset_get(): Argument #2 ($datetime) must be of type DateTimeInterface, string given in /in/3H8W7:9 Stack trace: #0 /in/3H8W7(9): timezone_offset_get(Object(DateTimeZone), '2016-01-06 03:0...') #1 {main} thrown in /in/3H8W7 on line 9
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:
57.45 ms | 401 KiB | 8 Q