xref: /PHP-7.0/ext/standard/tests/array/bug72369.phpt (revision bfcf3223)
1--TEST--
2Bug #72369 (array_merge() produces references in PHP7)
3--FILE--
4<?php
5$x = 'xxx';
6$d = ['test' => &$x];
7unset($x);
8$a = ['test' => 'yyy'];
9$a = array_merge($a, $d);
10debug_zval_dump($a);
11?>
12--EXPECTF--
13array(1) refcount(%d){
14  ["test"]=>
15  string(3) "xxx" refcount(%d)
16}
17