3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo (new \DateTime('@1452596132', 'Europe/Amsterdam'))->format('d-m-y H:i');
based on t4j6v
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught TypeError: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given in /in/p33ue:3 Stack trace: #0 /in/p33ue(3): DateTime->__construct('@1452596132', 'Europe/Amsterda...') #1 {main} thrown in /in/p33ue on line 3
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 2 to be DateTimeZone, string given' in /in/p33ue:3 Stack trace: #0 /in/p33ue(3): DateTime->__construct('@1452596132', 'Europe/Amsterda...') #1 {main} thrown in /in/p33ue on line 3
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/p33ue on line 3
Process exited with code 255.