3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $asdf = new DateTime("first day of year 2016"); var_dump($asdf); ?>
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (first day of year 2016) at position 13 (y): The timezone could not be found in the database in /in/HPcVi:2 Stack trace: #0 /in/HPcVi(2): DateTime->__construct('first day of ye...') #1 {main} thrown in /in/HPcVi on line 2
Process exited with code 255.
Output for 5.3.20 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (first day of year 2016) at position 13 (y): The timezone could not be found in the database' in /in/HPcVi:2 Stack trace: #0 /in/HPcVi(2): DateTime->__construct('first day of ye...') #1 {main} thrown in /in/HPcVi on line 2
Process exited with code 255.