3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { public function bar() { return array(); } } $foo = new Foo(); var_dump(empty($foo->getBar()));
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined method Foo::getBar() in /in/0rUXV:13 Stack trace: #0 {main} thrown in /in/0rUXV on line 13
Process exited with code 255.
Output for 5.5.24 - 5.6.28
Fatal error: Call to undefined method Foo::getBar() in /in/0rUXV on line 13
Process exited with code 255.
Output for 5.3.18 - 5.4.45
Fatal error: Can't use method return value in write context in /in/0rUXV on line 13
Process exited with code 255.