1--TEST-- 2Test is_callable() function 3--FILE-- 4<?php 5/* Prototype: bool is_callable ( mixed $var [, bool $syntax_only [, string &$callable_name]] ); 6 Description: Verify that the contents of a variable can be called as a function 7 In case of objects, $var = array($SomeObject, 'MethodName') 8*/ 9 10echo "\n*** Testing error conditions ***\n"; 11 12echo "\n-- Testing is_callable() function with less than expected no. of arguments --\n"; 13var_dump( is_callable() ); 14 15echo "\n-- Testing is_callable() function with more than expected no. of arguments --\n"; 16var_dump( is_callable("string", TRUE, $callable_name, "EXTRA") ); 17 18?> 19===DONE=== 20--EXPECTF-- 21*** Testing error conditions *** 22 23-- Testing is_callable() function with less than expected no. of arguments -- 24 25Warning: is_callable() expects at least 1 parameter, 0 given in %s on line %d 26NULL 27 28-- Testing is_callable() function with more than expected no. of arguments -- 29 30Warning: is_callable() expects at most 3 parameters, 4 given in %s on line %d 31NULL 32===DONE=== 33