Lines Matching refs:in_array
2 Test in_array() function : error conditions
6 * Prototype : bool in_array ( mixed $needle, array $haystack [, bool $strict] )
12 echo "\n*** Testing error conditions of in_array() ***\n";
14 var_dump( in_array() );
16 /* unexpected no.of arguments in in_array() */
18 var_dump( in_array(1, $var, 0, "test") );
19 var_dump( in_array("test") );
21 /* unexpected second argument in in_array() */
23 var_dump( in_array("test", $var) );
24 var_dump( in_array(1, 123) );
29 *** Testing error conditions of in_array() ***
31 Warning: in_array() expects at least 2 parameters, 0 given in %s on line %d
34 Warning: in_array() expects at most 3 parameters, 4 given in %s on line %d
37 Warning: in_array() expects at least 2 parameters, 1 given in %s on line %d
40 Warning: in_array() expects parameter 2 to be array, string given in %s on line %d
43 Warning: in_array() expects parameter 2 to be array, int given in %s on line %d