3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = 'before desterday'; var_dump(new DateTime($date));
based on QLihU
Output for 7.0.0 - 7.3.0alpha1
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (before desterday) at position 0 (b): The timezone could not be found in the database in /in/Fue5d:5 Stack trace: #0 /in/Fue5d(5): DateTime->__construct('before desterda...') #1 {main} thrown in /in/Fue5d on line 5
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (before desterday) at position 0 (b): The timezone could not be found in the database' in /in/Fue5d:5 Stack trace: #0 /in/Fue5d(5): DateTime->__construct() #1 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (before desterday) at position 0 (b): The timezone could not be found in the database' in /in/Fue5d:5 Stack trace: #0 /in/Fue5d(5): DateTime->__construct('before desterda...') #1 {main} thrown in /in/Fue5d on line 5
Process exited with code 255.