1--TEST-- 2Test is_callable() function 3--INI-- 4precision=14 5error_reporting = E_ALL & ~E_NOTICE | E_STRICT 6--FILE-- 7<?php 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') 11*/ 12 13echo "\n*** Testing error conditions ***\n"; 14 15echo "\n-- Testing is_callable() function with less than expected no. of arguments --\n"; 16var_dump( is_callable() ); 17 18echo "\n-- Testing is_callable() function with more than expected no. of arguments --\n"; 19var_dump( is_callable("string", TRUE, $callable_name, "EXTRA") ); 20 21?> 22===DONE=== 23--EXPECTF-- 24*** Testing error conditions *** 25 26-- Testing is_callable() function with less than expected no. of arguments -- 27 28Warning: is_callable() expects at least 1 parameter, 0 given in %s on line %d 29NULL 30 31-- Testing is_callable() function with more than expected no. of arguments -- 32 33Warning: is_callable() expects at most 3 parameters, 4 given in %s on line %d 34NULL 35===DONE=== 36