3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FooBar { public static function baz() { function isGlobalFunction() { echo 'yep'; } return true; } } FooBar::baz(); var_dump(function_exists('isGlobalFunction')); isGlobalFunction();

preferences:
70.24 ms | 405 KiB | 5 Q