3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $d1 = new \DateTime('2017--07-05T11:00:00+02:00'); var_dump($d1);
Output for 7.0.0 - 7.3.1
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (2017--07-05T11:00:00+02:00) at position 4 (-): Unexpected character in /in/jZ3Yp:2 Stack trace: #0 /in/jZ3Yp(2): DateTime->__construct('2017--07-05T11:...') #1 {main} thrown in /in/jZ3Yp on line 2
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (2017--07-05T11:00:00+02:00) at position 4 (-): Unexpected character' in /in/jZ3Yp:-1 Stack trace: #0 /in/jZ3Yp(-1): DateTime->__construct() #1 {main}
Process exited with code 255.
Output for hhvm-3.15.4 - 3.21.3
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (2017--07-05T11:00:00+02:00) at position 4 (-): Unexpected character' in /in/jZ3Yp:2 Stack trace: #0 /in/jZ3Yp(2): DateTime->__construct() #1 {main}
Process exited with code 255.
Output for 5.6.30
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (2017--07-05T11:00:00+02:00) at position 4 (-): Unexpected character' in /in/jZ3Yp:2 Stack trace: #0 /in/jZ3Yp(2): DateTime->__construct('2017--07-05T11:...') #1 {main} thrown in /in/jZ3Yp on line 2
Process exited with code 255.