3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = new \DateTimeImmutable('last sunday in october'); echo $date->format('Y-m-d H:i:s');
based on H4BXL
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Exception: DateTimeImmutable::__construct(): Failed to parse time string (last sunday in october) at position 12 (i): The timezone could not be found in the database in /in/W78it:3 Stack trace: #0 /in/W78it(3): DateTimeImmutable->__construct('last sunday in ...') #1 {main} thrown in /in/W78it on line 3
Process exited with code 255.
Output for 5.5.24 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'DateTimeImmutable::__construct(): Failed to parse time string (last sunday in october) at position 12 (i): The timezone could not be found in the database' in /in/W78it:3 Stack trace: #0 /in/W78it(3): DateTimeImmutable->__construct('last sunday in ...') #1 {main} thrown in /in/W78it on line 3
Process exited with code 255.
Output for 5.3.19 - 5.4.45
Fatal error: Class 'DateTimeImmutable' not found in /in/W78it on line 3
Process exited with code 255.