3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foobar { function foo() { echo 'FOO'; function bar() { echo 'BAR'; } } } $c = new Foobar(); $c->foo(); bar();
based on DuLig
Output for 4.3.0 - 4.4.9, 5.0.5 - 7.1.0
FOOBAR
Output for 5.0.0 - 5.0.4
FOO Fatal error: Non-static method Foobar::bar() cannot be called statically in /in/1sKFK on line 20
Process exited with code 255.