1--TEST--
2Test array_diff_uassoc() function : usage variation - Passing boolean indexed array
3--FILE--
4<?php
5/* Prototype  : array array_diff_uassoc(array arr1, array arr2 [, array ...], callback key_comp_func)
6 * Description: Computes the difference of arrays with additional index check which is performed by a
7 * 				user supplied callback function
8 * Source code: ext/standard/array.c
9 */
10
11echo "*** Testing array_diff_uassoc() : usage variation ***\n";
12
13// Initialise function arguments not being substituted (if any)
14$input_array = array(0 => '0', 1 => '1', -10 => '-10', 'true' => 1, 'false' => 0);
15$boolean_indx_array = array(true => 'boolt', false => 'boolf', TRUE => 'boolT', FALSE => 'boolF');
16
17echo "\n-- Testing array_diff_key() function with float indexed array --\n";
18var_dump( array_diff_uassoc($input_array, $boolean_indx_array, "strcasecmp") );
19var_dump( array_diff_uassoc($boolean_indx_array, $input_array, "strcasecmp") );
20
21?>
22===DONE===
23--EXPECT--
24*** Testing array_diff_uassoc() : usage variation ***
25
26-- Testing array_diff_key() function with float indexed array --
27array(5) {
28  [0]=>
29  string(1) "0"
30  [1]=>
31  string(1) "1"
32  [-10]=>
33  string(3) "-10"
34  ["true"]=>
35  int(1)
36  ["false"]=>
37  int(0)
38}
39array(2) {
40  [1]=>
41  string(5) "boolT"
42  [0]=>
43  string(5) "boolF"
44}
45===DONE===
46