3v4l.org

run code in 200+ PHP versions simultaneously
<?php //Source: https://bugs.php.net/bug.php?id=67634 $date = \DateTimeImmutable::createFromFormat(\DateTime::ATOM, '2019-11-03T01:00:00-05:00')->setTimezone(new \DateTimeZone('America/New_York')); var_dump($date->format(\DateTimeImmutable::ATOM)); $date->getTimestamp(); var_dump($date->format(\DateTimeImmutable::ATOM));
based on M5Hcu

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for branch php-master
string(25) "2019-11-03T01:00:00-05:00" string(25) "2019-11-03T01:00:00-04:00"
Output for branch php-master+opcache
string(25) "2019-11-03T01:00:00-05:00" string(25) "2019-11-03T01:00:00-04:00"
Output for branch php-master+jit
string(25) "2019-11-03T01:00:00-05:00" string(25) "2019-11-03T01:00:00-04:00"
Output for Typed properties v2
string(25) "2019-11-03T01:00:00-05:00" string(25) "2019-11-03T01:00:00-04:00"
Output for Arrow functions
Fatal error: Uncaught Error: Undefined class constant 'ATOM' in /in/uk3fZ:6 Stack trace: #0 {main} thrown in /in/uk3fZ on line 6
Process exited with code 255.
Output for Object typehint
Fatal error: Uncaught Error: Undefined class constant 'ATOM' in /in/uk3fZ:6 Stack trace: #0 {main} thrown in /in/uk3fZ on line 6
Process exited with code 255.
Output for Array change keys
Fatal error: Uncaught Error: Undefined class constant 'ATOM' in /in/uk3fZ:6 Stack trace: #0 {main} thrown in /in/uk3fZ on line 6
Process exited with code 255.
Output for Lexical anon
Fatal error: Undefined class constant 'ATOM' in /in/uk3fZ on line 6
Process exited with code 255.

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