3v4l.org

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