3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php try { $a = NULL; $a->test(); } catch (BadMethodCallException $e) { echo $e->getMessage(); } catch (EngineException $e) { echo $e->getMessage(); } catch (Error $e) { echo $e->getMessage(); }
based on aeNlb
Output for 7.0.0 - 7.2.0
Call to a member function test() on null
Output for 5.6.8 - 5.6.28
Fatal error: Call to a member function test() on null in /in/CMTaK on line 5
Process exited with code 255.
Output for 5.3.19 - 5.5.35
Fatal error: Call to a member function test() on a non-object in /in/CMTaK on line 5
Process exited with code 255.