3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = new DateTimeImmutable('monday midnight'); $b = new DateTimeImmutable('yesterdat midnight'); var_dump($a == $b);
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Exception: DateTimeImmutable::__construct(): Failed to parse time string (yesterdat midnight) at position 0 (y): The timezone could not be found in the database in /in/I3pmO:4 Stack trace: #0 /in/I3pmO(4): DateTimeImmutable->__construct('yesterdat midni...') #1 {main} thrown in /in/I3pmO on line 4
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'DateTimeImmutable::__construct(): Failed to parse time string (yesterdat midnight) at position 0 (y): The timezone could not be found in the database' in /in/I3pmO:4 Stack trace: #0 /in/I3pmO(4): DateTimeImmutable->__construct('yesterdat midni...') #1 {main} thrown in /in/I3pmO on line 4
Process exited with code 255.
Output for 5.0.0 - 5.4.45
Fatal error: Class 'DateTimeImmutable' not found in /in/I3pmO on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetimeimmutable in /in/I3pmO on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetimeimmutable in /in/I3pmO on line 3