mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
28 lines
263 B
PHP
28 lines
263 B
PHP
--TEST--
|
|
Bug #69376 (Wrong ref counting)
|
|
--FILE--
|
|
<?php
|
|
function &test() {
|
|
$var = array();
|
|
$var[] =& $var;
|
|
|
|
return $var;
|
|
};
|
|
|
|
$a = test();
|
|
$b = $a;
|
|
$b[0] = 123;
|
|
|
|
print_r($a);
|
|
print_r($b);
|
|
?>
|
|
--EXPECT--
|
|
Array
|
|
(
|
|
[0] => 123
|
|
)
|
|
Array
|
|
(
|
|
[0] => 123
|
|
)
|