3v4l.org

run code in 300+ PHP versions simultaneously
<?php function wtf(array $arrayUnderTest) { 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(); } class x { function foo() { print "\nfoo"; } } $x = new x(); $test = array($x, "foo"); wtf($test);

preferences:
46.69 ms | 402 KiB | 5 Q