3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $today = new DateTime('first 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 8YsET
Output for 7.0.0 - 7.3.0rc4
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (first day of this month?) at position 23 (?): Unexpected character in /in/vWZLI:2 Stack trace: #0 /in/vWZLI(2): DateTime->__construct('first day of th...') #1 {main} thrown in /in/vWZLI 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 (first day of this month?) at position 23 (?): Unexpected character' in /in/vWZLI:2 Stack trace: #0 /in/vWZLI(2): DateTime->__construct('first day of th...') #1 {main} thrown in /in/vWZLI on line 2
Process exited with code 255.