3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { function doStuff(){ echo 'Hi!'; } } $obj = new stdClass; $obj->theFoo = new Foo(); $obj->theFoo->doStuff(); @$obj->notTheFoo->doStuff();
Output for 7.0.0 - 7.3.0
Hi! Fatal error: Uncaught Error: Call to a member function doStuff() on null in /in/OLJmG:12 Stack trace: #0 {main} thrown in /in/OLJmG on line 12
Process exited with code 255.
Output for 4.3.2 - 5.6.38
Hi!
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Hi!