3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class foo { public function getme(){ return 10; } } $bar= new $foo(); var_dump(empty($bar->getme()));
based on TBMdW
Output for 7.0.0 - 7.3.0alpha1
Notice: Undefined variable: foo in /in/02QO1 on line 6 Fatal error: Uncaught Error: Class name must be a valid object or a string in /in/02QO1:6 Stack trace: #0 {main} thrown in /in/02QO1 on line 6
Process exited with code 255.
Output for 5.5.24 - 5.6.28
Notice: Undefined variable: foo in /in/02QO1 on line 6 Fatal error: Class name must be a valid object or a string in /in/02QO1 on line 6
Process exited with code 255.
Output for 5.3.21 - 5.4.45
Fatal error: Can't use method return value in write context in /in/02QO1 on line 7
Process exited with code 255.