xref: /PHP-7.4/Zend/tests/bug69376.phpt (revision 55cdde3d)
1--TEST--
2Bug #69376 (Wrong ref counting)
3--FILE--
4<?php
5function &test() {
6    $var = array();
7    $var[] =& $var;
8
9    return $var;
10};
11
12$a = test();
13$b = $a;
14$b[0] = 123;
15
16print_r($a);
17print_r($b);
18?>
19--EXPECT--
20Array
21(
22    [0] => 123
23)
24Array
25(
26    [0] => 123
27)
28