3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function call_method($obj) { $obj->method(); } try { call_method(null); // oops! } catch (Error $e) { echo "Exception propre: {$e->getMessage()}\n"; }
based on duKa1
Output for 7.0.0 - 7.2.0
Exception propre: Call to a member function method() on null
Output for 5.6.0 - 5.6.28
Fatal error: Call to a member function method() on null in /in/lEKVS on line 4
Process exited with code 255.
Output for 5.4.0 - 5.5.38
Fatal error: Call to a member function method() on a non-object in /in/lEKVS on line 4
Process exited with code 255.