Lines Matching refs:array_search
2 Test array_search() function : usage variations - haystack as sub-array/object
5 /* checking for sub-arrays with array_search() */
6 echo "*** Testing sub-arrays with array_search() ***\n";
14 var_dump( array_search("four", $sub_array) );
16 var_dump( array_search(3, $sub_array[1]) );
17 var_dump( array_search(array('','i'), $sub_array) );
19 /* checking for objects in array_search() */
20 echo "\n*** Testing objects with array_search() ***\n";
31 var_dump( array_search("array_var", $array_search_obj) );
37 var_dump( array_search("foo", $array_search_obj) );
42 var_dump( array_search("one", $array_search_obj->array_var) );
47 *** Testing sub-arrays with array_search() ***
52 *** Testing objects with array_search() ***
53 array_search(): Argument #2 ($haystack) must be of type array, array_search_check given
54 array_search(): Argument #2 ($haystack) must be of type array, array_search_check given