2 /* Prototype : array array_intersect_uassoc(array arr1, array arr2 [, array ...], callback key_compare_func)
3 * Description: Computes the intersection of arrays with additional index check, compares indexes by a callback function
4 * Source code: ext/standard/array.c
7 echo "*** Testing array_intersect_uassoc() : usage variation ***\n";
10 $arr_float = array(0 => 1.00, 1.00 => 2.00);
11 $arr_string = array('1', '2', '3');
12 $arr_string_float = array('1.00', '2.00');
14 function key_compare_func($a, $b)
19 return ($a > $b)?
1:-1;
22 echo "\n-- Result of floating points and strings containing integers intersection --\n";
23 var_dump( array_intersect_uassoc($arr_float, $arr_string, "key_compare_func") );
25 echo "\n-- Result of floating points and strings containing floating point intersection --\n";
26 var_dump( array_intersect_uassoc($arr_float, $arr_string_float, "key_compare_func") );