3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(new DateTime('2018-04-01 23:45:30', 'Asia/Krasnoyarsk'));
Output for 7.0.30 - 7.3.0rc3
Fatal error: Uncaught TypeError: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given in /in/LQSUB:3 Stack trace: #0 /in/LQSUB(3): DateTime->__construct('2018-04-01 23:4...', 'Asia/Krasnoyars...') #1 {main} thrown in /in/LQSUB on line 3
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught exception 'Exception' with message '__construct() expects parameter 2 to be object, string given' in /in/LQSUB:-1 Stack trace: #0 /in/LQSUB(-1): DateTime->__construct() #1 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
Fatal error: Uncaught exception 'Exception' with message '__construct() expects parameter 2 to be object, string given' in /in/LQSUB:3 Stack trace: #0 /in/LQSUB(3): DateTime->__construct() #1 {main}
Process exited with code 255.
Output for 5.6.30
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/LQSUB:3 Stack trace: #0 /in/LQSUB(3): DateTime->__construct('2018-04-01 23:4...', 'Asia/Krasnoyars...') #1 {main} thrown in /in/LQSUB on line 3
Process exited with code 255.