1--TEST--
2array_udiff_uassoc(): Test return type and value for expected input
3--FILE--
4<?php
5/*
6* proto array array_udiff_assoc ( array $array1, array $array2 [, array $ ..., callback $data_compare_func] )
7* Function is implemented in ext/standard/array.c
8*/
9class cr {
10    private $priv_member;
11    function __construct($val) {
12        $this->priv_member = $val;
13    }
14    static function comp_func_cr($a, $b) {
15        if ($a->priv_member === $b->priv_member) return 0;
16        return ($a->priv_member > $b->priv_member) ? 1 : -1;
17    }
18    static function comp_func_key($a, $b) {
19        if ($a === $b) return 0;
20        return ($a > $b) ? 1 : -1;
21    }
22}
23$a = array("0.1" => new cr(9), "0.5" => new cr(12), 0 => new cr(23), 1 => new cr(4), 2 => new cr(-15),);
24$b = array("0.2" => new cr(9), "0.5" => new cr(22), 0 => new cr(3), 1 => new cr(4), 2 => new cr(-15),);
25$result = array_udiff_uassoc($a, $b, array("cr", "comp_func_cr"), array("cr", "comp_func_key"));
26var_dump($result);
27?>
28--EXPECTF--
29array(3) {
30  ["0.1"]=>
31  object(cr)#%d (1) {
32    ["priv_member":"cr":private]=>
33    int(9)
34  }
35  ["0.5"]=>
36  object(cr)#%d (1) {
37    ["priv_member":"cr":private]=>
38    int(12)
39  }
40  [0]=>
41  object(cr)#%d (1) {
42    ["priv_member":"cr":private]=>
43    int(23)
44  }
45}
46