3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $utc = new DateTimeZone('UTC'); $amla = new DateTimeZone('America/New_York'); $two_past_midnight = new DateTime('2016-13-05 19:00', $utc); $two_past_midnight->setTimeZone($amla); echo $two_past_midnight->format('T'); ?>
based on 76tLO
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (2016-13-05 19:00) at position 6 (3): Unexpected character in /in/fVfsE:5 Stack trace: #0 /in/fVfsE(5): DateTime->__construct('2016-13-05 19:0...', Object(DateTimeZone)) #1 {main} thrown in /in/fVfsE on line 5
Process exited with code 255.
Output for 5.3.21 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (2016-13-05 19:00) at position 6 (3): Unexpected character' in /in/fVfsE:5 Stack trace: #0 /in/fVfsE(5): DateTime->__construct('2016-13-05 19:0...', Object(DateTimeZone)) #1 {main} thrown in /in/fVfsE on line 5
Process exited with code 255.