3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $test = null; var_dump($test->func() ?? 'fail');
Output for 7.0.0 - 7.3.1
Fatal error: Uncaught Error: Call to a member function func() on null in /in/bnSb1:5 Stack trace: #0 {main} thrown in /in/bnSb1 on line 5
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught exception 'BadMethodCallException' with message 'Call to a member function func() on a non-object (null)' in /in/bnSb1:5 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.38
Parse error: syntax error, unexpected '?' in /in/bnSb1 on line 5
Process exited with code 255.