3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function doFoo() { function testFoo() { var_dump('test'); } testFoo(); } } $foo = new Foo(); $foo->doFoo(); testFoo();

preferences:
28.43 ms | 402 KiB | 5 Q