1--TEST--
2Test array_(replace|merge)_recursive with references
3--FILE--
4<?php
5
6$one = [1];
7$two = [42];
8$arr1 = ['k' => &$one];
9$arr2 = ['k' => &$two];
10var_dump(current($one), current($two));
11array_replace_recursive($arr1, $arr2);
12var_dump(current($one), current($two));
13
14$one = [1];
15$two = [42];
16$arr1 = ['k' => &$one];
17$arr2 = ['k' => &$two];
18var_dump(current($one), current($two));
19array_merge_recursive($arr1, $arr2);
20var_dump(current($one), current($two));
21
22?>
23--EXPECT--
24int(1)
25int(42)
26int(1)
27int(42)
28int(1)
29int(42)
30int(1)
31int(42)
32