3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = 'before yesterday'; var_dump(new DateTime($date));
based on fOSYP
Output for 7.0.0 - 7.3.0beta1
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (before yesterday) at position 0 (b): The timezone could not be found in the database in /in/vsNIf:5 Stack trace: #0 /in/vsNIf(5): DateTime->__construct('before yesterda...') #1 {main} thrown in /in/vsNIf 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 yesterday) at position 0 (b): The timezone could not be found in the database' in /in/vsNIf:5 Stack trace: #0 /in/vsNIf(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 yesterday) at position 0 (b): The timezone could not be found in the database' in /in/vsNIf:5 Stack trace: #0 /in/vsNIf(5): DateTime->__construct('before yesterda...') #1 {main} thrown in /in/vsNIf on line 5
Process exited with code 255.