2007-12-28 21:22:17 +08:00
|
|
|
--TEST--
|
2008-05-14 21:05:55 +08:00
|
|
|
Bug #38469 (Unexpected creation of cycle)
|
2007-12-28 21:22:17 +08:00
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
$a = array();
|
|
|
|
$a[0] = $a;
|
|
|
|
var_dump($a);
|
|
|
|
$b = array(array());
|
|
|
|
$b[0][0] = $b;
|
|
|
|
var_dump($b);
|
2008-11-24 04:34:40 +08:00
|
|
|
|
|
|
|
function f() {
|
|
|
|
$a = array();
|
|
|
|
$a[0] = $a;
|
|
|
|
var_dump($a);
|
|
|
|
$b = array(array());
|
|
|
|
$b[0][0] = $b;
|
|
|
|
var_dump($b);
|
|
|
|
}
|
|
|
|
f();
|
2007-12-28 21:22:17 +08:00
|
|
|
?>
|
|
|
|
--EXPECT--
|
|
|
|
array(1) {
|
|
|
|
[0]=>
|
|
|
|
array(0) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
array(1) {
|
|
|
|
[0]=>
|
|
|
|
array(1) {
|
|
|
|
[0]=>
|
|
|
|
array(1) {
|
|
|
|
[0]=>
|
|
|
|
array(0) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2008-11-24 04:34:40 +08:00
|
|
|
array(1) {
|
|
|
|
[0]=>
|
|
|
|
array(0) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
array(1) {
|
|
|
|
[0]=>
|
|
|
|
array(1) {
|
|
|
|
[0]=>
|
|
|
|
array(1) {
|
|
|
|
[0]=>
|
|
|
|
array(0) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|