2
Test is_callable() function
5
error_reporting = E_ALL & ~E_NOTICE | E_STRICT
8
/* Prototype: bool is_callable ( mixed $var [, bool $syntax_only [, string &$callable_name]] );
9
Description: Verify that the contents of a variable can be called as a function
10
In case of objects, $var = array($SomeObject, 'MethodName')
13
echo "\n*** Testing error conditions ***\n";
15
echo "\n-- Testing is_callable() function with less than expected no. of arguments --\n";
16
var_dump( is_callable() );
18
echo "\n-- Testing is_callable() function with more than expected no. of arguments --\n";
19
var_dump( is_callable("string", TRUE, $callable_name, "EXTRA") );
24
*** Testing error conditions ***
26
-- Testing is_callable() function with less than expected no. of arguments --
28
Warning: is_callable() expects at least 1 parameter, 0 given in %s on line %d
31
-- Testing is_callable() function with more than expected no. of arguments --
33
Warning: is_callable() expects at most 3 parameters, 4 given in %s on line %d
b'\\ No newline at end of file'