1--TEST--
2Test array_diff_uassoc() function : usage variation - Passing null,unset and undefined variable indexed array
3--FILE--
4<?php
5echo "*** Testing array_diff_uassoc() : usage variation ***\n";
6
7// Initialise function arguments not being substituted (if any)
8$input_array = array(10 => '10', "" => '');
9
10//get an unset variable
11$unset_var = 10;
12unset ($unset_var);
13
14$input_arrays = array(
15      'null indexed' => array(NULL => NULL, null => null),
16      'undefined indexed' => array(@$undefined_var => @$undefined_var),
17      'unset indexed' => array(@$unset_var => @$unset_var),
18);
19
20foreach($input_arrays as $key =>$value) {
21      echo "\n--$key--\n";
22      var_dump( array_diff_uassoc($input_array, $value, "strcasecmp") );
23      var_dump( array_diff_uassoc($value, $input_array, "strcasecmp") );
24}
25
26?>
27--EXPECT--
28*** Testing array_diff_uassoc() : usage variation ***
29
30--null indexed--
31array(1) {
32  [10]=>
33  string(2) "10"
34}
35array(0) {
36}
37
38--undefined indexed--
39array(1) {
40  [10]=>
41  string(2) "10"
42}
43array(0) {
44}
45
46--unset indexed--
47array(1) {
48  [10]=>
49  string(2) "10"
50}
51array(0) {
52}
53