3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime('2016-10-10 10:00:00'); var_dump($date); $tz = new DateTimeZone('-02 00'); $date->setTimeZone($tz); var_dump($date);
Output for git.master, git.master_jit
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-10-10 10:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught Exception: DateTimeZone::__construct(): Unknown or bad timezone (-02 00) in /in/A1kWb:6 Stack trace: #0 /in/A1kWb(6): DateTimeZone->__construct('-02 00') #1 {main} thrown in /in/A1kWb on line 6
Process exited with code 255.
Output for rfc.property-hooks
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-10-10 10:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught DateInvalidTimeZoneException: DateTimeZone::__construct(): Unknown or bad timezone (-02 00) in /in/A1kWb:6 Stack trace: #0 /in/A1kWb(6): DateTimeZone->__construct('-02 00') #1 {main} thrown in /in/A1kWb on line 6
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:
65.3 ms | 401 KiB | 8 Q