<?php
function wtf(array $arrayUnderTest) {
echo is_callable($arrayUnderTest) ? 'This is a callable' : 'This is not a callable';
echo "\n";
echo is_array($arrayUnderTest) ? 'This is an array' : 'This is not an array';
$arrayUnderTest();
}
class x {
function foo() {
print "\nfoo";
}
}
$x = new x();
$test = array($x, "foo");
wtf($test);