3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dt1 = new DateTimeImmutable(); $dt2 = $dt1->modify("+1 day"); $interval = $dt1->diff($dt2); echo $interval->hours;
Output for 5.5.24 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined property: DateInterval::$hours in /in/XTHoR on line 5
Output for hhvm-3.12.0
Fatal error: Uncaught exception 'Exception' with message 'Undefined property 'hours) on DateInterval object' in /in/XTHoR:5 Stack trace: #0 /in/XTHoR(5): DateInterval->__get() #1 {main}
Process exited with code 255.
Output for hhvm-3.10.0
Fatal error: Uncaught exception 'Exception' with message 'Undefined property 'hours) on DateInterval object' in /in/XTHoR:-1 Stack trace: #0 /in/XTHoR(-1): DateInterval->__get() #1 {main}
Process exited with code 255.
Output for 5.0.0 - 5.4.45
Fatal error: Class 'DateTimeImmutable' not found in /in/XTHoR on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetimeimmutable in /in/XTHoR on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetimeimmutable in /in/XTHoR on line 2