3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php try { $a = NULL; $a->test(); } catch (BadMethodCallException $e) { echo $e->getMessage(); }
based on 9gm9E
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to a member function test() on null in /in/PQW2V:5 Stack trace: #0 {main} thrown in /in/PQW2V on line 5
Process exited with code 255.
Output for hhvm-3.10.1 - 3.17.3
Call to a member function test() on a non-object (null)
Output for 5.6.0 - 5.6.30
Fatal error: Call to a member function test() on null in /in/PQW2V on line 5
Process exited with code 255.
Output for 5.5.0 - 5.5.38
Fatal error: Call to a member function test() on a non-object in /in/PQW2V on line 5
Process exited with code 255.