3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(new \DateTimeImmutable(new \DateTimeImmutable('tomorrow + 1 day')));
based on GRpOO
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught TypeError: DateTimeImmutable::__construct() expects parameter 1 to be string, object given in /in/doaIb:3 Stack trace: #0 /in/doaIb(3): DateTimeImmutable->__construct(Object(DateTimeImmutable)) #1 {main} thrown in /in/doaIb 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() expects parameter 1 to be string, object given' in /in/doaIb:3 Stack trace: #0 /in/doaIb(3): DateTimeImmutable->__construct(Object(DateTimeImmutable)) #1 {main} thrown in /in/doaIb on line 3
Process exited with code 255.
Output for 5.3.21 - 5.4.45
Fatal error: Class 'DateTimeImmutable' not found in /in/doaIb on line 3
Process exited with code 255.