1--TEST--
2Test array_intersect_uassoc() function : usage variation - Intersection of strings containing integers, float
3--FILE--
4<?php
5echo "*** Testing array_intersect_uassoc() : usage variation ***\n";
6
7//Initialize variables
8$arr1_string_int = array('1', '2');
9$arr2_string_int = array('1', '3');
10$arr1_string_float = array('1.00', '2.00');
11$arr2_string_float = array('1.00', '3.00');
12
13function key_compare_func($a, $b)
14{
15    if ($a === $b) {
16        return 0;
17    }
18    return ($a > $b)? 1:-1;
19}
20
21echo "\n-- Result of strings containing integers intersection --\n";
22var_dump( array_intersect_uassoc($arr1_string_int, $arr2_string_int, "key_compare_func") );
23
24echo "\n-- Result of strings containing floating points intersection --\n";
25var_dump( array_intersect_uassoc($arr1_string_float, $arr2_string_float, "key_compare_func") );
26
27echo "\n-- Result of strings containing integers and strings containing floating points intersection --\n";
28var_dump( array_intersect_uassoc($arr1_string_int, $arr2_string_float, "key_compare_func") );
29?>
30--EXPECT--
31*** Testing array_intersect_uassoc() : usage variation ***
32
33-- Result of strings containing integers intersection --
34array(1) {
35  [0]=>
36  string(1) "1"
37}
38
39-- Result of strings containing floating points intersection --
40array(1) {
41  [0]=>
42  string(4) "1.00"
43}
44
45-- Result of strings containing integers and strings containing floating points intersection --
46array(0) {
47}
48