3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $today = new DateTime('second day of this month'); $clone = clone $today; $clone->modify('noon'); $currentGenerateDay = new DateTime('second day of this month'); echo $clone->format('Y-m-d H:i:s').' '.$currentGenerateDay->format('Y-m-d H:i:s'); var_dump($clone == $currentGenerateDay);
based on rMAqC
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (second day of this month) at position 11 (o): The timezone could not be found in the database in /in/8Wb3D:2 Stack trace: #0 /in/8Wb3D(2): DateTime->__construct('second day of t...') #1 {main} thrown in /in/8Wb3D 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 (second day of this month) at position 11 (o): The timezone could not be found in the database' in /in/8Wb3D:2 Stack trace: #0 /in/8Wb3D(2): DateTime->__construct('second day of t...') #1 {main} thrown in /in/8Wb3D on line 2
Process exited with code 255.