3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $away_date = (new DateTime())->format('Y-m-d H:i:s'); echo $test; $away_date->add(new DateInterval('PT2M'));
based on 96fuY
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: test in /in/MmgPd on line 3 Fatal error: Uncaught Error: Call to a member function add() on string in /in/MmgPd:4 Stack trace: #0 {main} thrown in /in/MmgPd on line 4
Process exited with code 255.
Output for 5.6.8 - 5.6.28
Notice: Undefined variable: test in /in/MmgPd on line 3 Fatal error: Call to a member function add() on string in /in/MmgPd on line 4
Process exited with code 255.
Output for 5.4.0 - 5.5.35
Notice: Undefined variable: test in /in/MmgPd on line 3 Fatal error: Call to a member function add() on a non-object in /in/MmgPd on line 4
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/MmgPd on line 2
Process exited with code 255.