xref: /PHP-7.1/ext/standard/tests/array/bug76505.phpt (revision 6531719d)
1--TEST--
2Bug #76505 (array_merge_recursive() is duplicating sub-array keys)
3--FILE--
4<?php
5$array1 = array(
6    'k' => array(
7        2 => 100,
8        98 => 200,
9    )
10);
11
12$array2 = array(
13    'k' => array(
14        64 => 300
15    )
16);
17
18$array3 = array_merge_recursive( $array1, $array2 );
19
20var_dump($array3);
21?>
22--EXPECT--
23array(1) {
24  ["k"]=>
25  array(3) {
26    [2]=>
27    int(100)
28    [98]=>
29    int(200)
30    [99]=>
31    int(300)
32  }
33}
34