3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime('midnight of first day of previous month'); echo $date->format('Y-m-d h:i:s');
Output for 7.0.0 - 7.3.0rc4
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (midnight of first day of previous month) at position 9 (o): The timezone could not be found in the database in /in/XpLMK:3 Stack trace: #0 /in/XpLMK(3): DateTime->__construct('midnight of fir...') #1 {main} thrown in /in/XpLMK on line 3
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 (midnight of first day of previous month) at position 9 (o): The timezone could not be found in the database' in /in/XpLMK:3 Stack trace: #0 /in/XpLMK(3): DateTime->__construct('midnight of fir...') #1 {main} thrown in /in/XpLMK on line 3
Process exited with code 255.