3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php foreach((new ReflectionClass('DateTime'))->getConstants() as $name=>$format){ echo 'DateTime::'.$name.' -> '.(new DateTime(NULL,new DateTimeZone("UTC+2")))->format($format).PHP_EOL; }
based on thYti
Output for 7.0.0 - 7.3.0rc3
Fatal error: Uncaught Exception: DateTimeZone::__construct(): Unknown or bad timezone (UTC+2) in /in/plqW8:3 Stack trace: #0 /in/plqW8(3): DateTimeZone->__construct('UTC+2') #1 {main} thrown in /in/plqW8 on line 3
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught exception 'Exception' with message 'DateTimeZone::__construct(): Unknown or bad timezone (UTC+2)' in /in/plqW8:3 Stack trace: #0 /in/plqW8(3): DateTimeZone->__construct() #1 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Uncaught exception 'Exception' with message 'DateTimeZone::__construct(): Unknown or bad timezone (UTC+2)' in /in/plqW8:3 Stack trace: #0 /in/plqW8(3): DateTimeZone->__construct('UTC+2') #1 {main} thrown in /in/plqW8 on line 3
Process exited with code 255.