3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x { function foo() { print "\nfoo"; } } $x = new x(); $test = array($x, "foo"); echo is_callable($test) ? 'This is a callable' : 'This is not a callable'; echo "\n"; echo is_array($test) ? 'This is an array' : 'This is not an array'; $test();

preferences:
57.86 ms | 402 KiB | 5 Q