xref: /PHP-8.3/ext/standard/tests/array/bug72369.phpt (revision e2c8ab7c)
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" interned
16}
17