1--TEST--
2Test array_merge() function : usage variations - Mixed keys
3--FILE--
4<?php
5/*
6 * Pass array_merge() arrays with mixed keys to test how it attaches them to
7 * existing arrays
8 */
9
10echo "*** Testing array_merge() : usage variations ***\n";
11
12//mixed keys
13$arr1 = array('zero', 20 => 'twenty', 'thirty' => 30, true => 'bool');
14$arr2 = array(0, 1, 2, null => 'null', 0 => 'float');
15
16var_dump(array_merge($arr1, $arr2));
17var_dump(array_merge($arr2, $arr1));
18
19echo "Done";
20?>
21--EXPECT--
22*** Testing array_merge() : usage variations ***
23array(8) {
24  [0]=>
25  string(4) "zero"
26  [1]=>
27  string(6) "twenty"
28  ["thirty"]=>
29  int(30)
30  [2]=>
31  string(4) "bool"
32  [3]=>
33  string(5) "float"
34  [4]=>
35  int(1)
36  [5]=>
37  int(2)
38  [""]=>
39  string(4) "null"
40}
41array(8) {
42  [0]=>
43  string(5) "float"
44  [1]=>
45  int(1)
46  [2]=>
47  int(2)
48  [""]=>
49  string(4) "null"
50  [3]=>
51  string(4) "zero"
52  [4]=>
53  string(6) "twenty"
54  ["thirty"]=>
55  int(30)
56  [5]=>
57  string(4) "bool"
58}
59Done
60