3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function bar() { return 42; } } $x = 'Foo::bar'; echo ( true === is_callable($x) ? 'T' : 'F' ); echo ( 42 == call_user_func($x) ? 'T' : 'F' );

preferences:
57.88 ms | 407 KiB | 5 Q