2007-10-23 20:52:40 +08:00
|
|
|
--TEST--
|
|
|
|
Bug #35163.2 (Array elements can lose references)
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
$a = array(1);
|
|
|
|
$b = 'a';
|
|
|
|
${$b}[] =& $$b;
|
|
|
|
${$b}[] =& $$b;
|
|
|
|
${$b}[0] = 2;
|
|
|
|
var_dump($a);
|
|
|
|
$a[0] = null;
|
|
|
|
$a = null;
|
|
|
|
?>
|
|
|
|
--EXPECT--
|
|
|
|
array(3) {
|
|
|
|
[0]=>
|
|
|
|
int(2)
|
|
|
|
[1]=>
|
|
|
|
&array(3) {
|
|
|
|
[0]=>
|
|
|
|
int(2)
|
|
|
|
[1]=>
|
2010-04-03 05:44:09 +08:00
|
|
|
*RECURSION*
|
2007-10-23 20:52:40 +08:00
|
|
|
[2]=>
|
2010-04-03 05:44:09 +08:00
|
|
|
*RECURSION*
|
2007-10-23 20:52:40 +08:00
|
|
|
}
|
|
|
|
[2]=>
|
|
|
|
&array(3) {
|
|
|
|
[0]=>
|
|
|
|
int(2)
|
|
|
|
[1]=>
|
2010-04-03 05:44:09 +08:00
|
|
|
*RECURSION*
|
2007-10-23 20:52:40 +08:00
|
|
|
[2]=>
|
2010-04-03 05:44:09 +08:00
|
|
|
*RECURSION*
|
2007-10-23 20:52:40 +08:00
|
|
|
}
|
|
|
|
}
|