3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = new \DateTime('back of now +1 day'); print_r($foo);
based on 2EWgE
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (back of now +1 day) at position 0 (b): The timezone could not be found in the database in /in/KsDVP:2 Stack trace: #0 /in/KsDVP(2): DateTime->__construct('back of now +1 ...') #1 {main} thrown in /in/KsDVP on line 2
Process exited with code 255.
Output for 5.3.22 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (back of now +1 day) at position 0 (b): The timezone could not be found in the database' in /in/KsDVP:2 Stack trace: #0 /in/KsDVP(2): DateTime->__construct('back of now +1 ...') #1 {main} thrown in /in/KsDVP on line 2
Process exited with code 255.