3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Goofy { public function hello() { echo 'Hello World!', PHP_EOL; } } (new Goofy(pippo))->hello();
based on 8YANf
Output for 7.2.0
Warning: Use of undefined constant pippo - assumed 'pippo' (this will throw an Error in a future version of PHP) in /in/nddbr on line 10 Hello World!
Output for 7.1.0 - 7.1.10
Notice: Use of undefined constant pippo - assumed 'pippo' in /in/nddbr on line 10 Hello World!
Output for 5.4.1 - 7.0.20
Hello World!
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/nddbr on line 10
Process exited with code 255.