3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php try { $z = false; $z->test(); } catch (Exception $e) { echo "Exception:\n"; var_dump($e->getMessage()); } catch (Error $e) { echo "Error:\n"; var_dump($e->getMessage()); }
based on mLmNd
Output for 7.3.0alpha1
Error: string(40) "Call to a member function test() on bool"
Output for 7.0.0 - 7.2.6
Error: string(43) "Call to a member function test() on boolean"
Output for 5.6.8 - 5.6.28
Fatal error: Call to a member function test() on boolean in /in/8Q86p on line 5
Process exited with code 255.
Output for 5.3.22 - 5.5.35
Fatal error: Call to a member function test() on a non-object in /in/8Q86p on line 5
Process exited with code 255.