Lines Matching refs:in_array
2 Test in_array() function : usage variations - haystack as sub-array/object
5 /* Test in_array() with haystack as sub-array and object */
7 /* checking for sub-arrays with in_array() */
8 echo "*** Testing sub-arrays with in_array() ***\n";
16 var_dump( in_array("four", $sub_array) );
18 var_dump( in_array(3, $sub_array[1]) );
19 var_dump( in_array(array('','i'), $sub_array) );
21 /* checking for objects in in_array() */
22 echo "\n*** Testing objects with in_array() ***\n";
33 var_dump( in_array("array_var", $in_array_obj) );
39 var_dump( in_array("foo", $in_array_obj) );
44 var_dump( in_array("one", $in_array_obj->array_var) );
49 *** Testing sub-arrays with in_array() ***
54 *** Testing objects with in_array() ***
55 in_array(): Argument #2 ($haystack) must be of type array, in_array_check given
56 in_array(): Argument #2 ($haystack) must be of type array, in_array_check given