3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(new \DateTimeImmutable(\DateInterval::createFromDateString('+100 years')));
based on OmA5h
Output for 7.0.30 - 7.3.0rc3
Fatal error: Uncaught TypeError: DateTimeImmutable::__construct() expects parameter 1 to be string, object given in /in/v4DLA:2 Stack trace: #0 /in/v4DLA(2): DateTimeImmutable->__construct(Object(DateInterval)) #1 {main} thrown in /in/v4DLA on line 2
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught TypeError: Argument 1 passed to DateTimeImmutable::__construct() must be an instance of string, DateInterval given in /in/v4DLA:-1 Stack trace: #0 /in/v4DLA(-1): DateTimeImmutable->__construct() #1 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
Fatal error: Uncaught TypeError: Argument 1 passed to DateTimeImmutable::__construct() must be an instance of string, DateInterval given in /in/v4DLA:2 Stack trace: #0 /in/v4DLA(2): DateTimeImmutable->__construct() #1 {main}
Process exited with code 255.
Output for 5.6.30
Fatal error: Uncaught exception 'Exception' with message 'DateTimeImmutable::__construct() expects parameter 1 to be string, object given' in /in/v4DLA:2 Stack trace: #0 /in/v4DLA(2): DateTimeImmutable->__construct(Object(DateInterval)) #1 {main} thrown in /in/v4DLA on line 2
Process exited with code 255.