3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $d = null; $date = new DateTime(); if (is_null($room->getUpdatedAt()) || $room->getUpdatedAt()->add(new \DateInterval('PT300S')) < new \DateTime() ) { echo 'hello'; }
based on qkVin
Output for 7.0.5 - 7.2.0
Notice: Undefined variable: room in /in/kaXPk on line 4 Fatal error: Uncaught Error: Call to a member function getUpdatedAt() on null in /in/kaXPk:4 Stack trace: #0 {main} thrown in /in/kaXPk on line 4
Process exited with code 255.
Output for 7.0.0 - 7.0.4
Notice: Undefined variable: room in /in/kaXPk on line 4 Fatal error: Uncaught Error: Call to a member function getUpdatedAt() on unknown in /in/kaXPk:4 Stack trace: #0 {main} thrown in /in/kaXPk on line 4
Process exited with code 255.
Output for 5.6.8 - 5.6.28
Notice: Undefined variable: room in /in/kaXPk on line 4 Fatal error: Call to a member function getUpdatedAt() on null in /in/kaXPk on line 4
Process exited with code 255.
Output for 5.3.21 - 5.5.35
Notice: Undefined variable: room in /in/kaXPk on line 4 Fatal error: Call to a member function getUpdatedAt() on a non-object in /in/kaXPk on line 4
Process exited with code 255.