3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function call_method($obj) { $a = 10/0; $obj->method(); } try { call_method(null); // oops! } catch (Error $e) { echo "Exception propre: {$e->getMessage()}\n"; }
based on RMhWJ
Output for 7.0.0 - 7.2.0
Warning: Division by zero in /in/FqQjn on line 4 Exception propre: Call to a member function method() on null
Output for 5.6.8 - 5.6.28
Warning: Division by zero in /in/FqQjn on line 4 Fatal error: Call to a member function method() on null in /in/FqQjn on line 5
Process exited with code 255.
Output for 5.3.19 - 5.5.35
Warning: Division by zero in /in/FqQjn on line 4 Fatal error: Call to a member function method() on a non-object in /in/FqQjn on line 5
Process exited with code 255.