mirror of
https://github.com/php/php-src.git
synced 2024-12-14 20:33:36 +08:00
9e3d2e3655
inconsistent results)
55 lines
577 B
PHP
55 lines
577 B
PHP
--TEST--
|
|
Bug #38469 (Unexpected creation of cycle)
|
|
--FILE--
|
|
<?php
|
|
$a = array();
|
|
$a[0] = $a;
|
|
var_dump($a);
|
|
$b = array(array());
|
|
$b[0][0] = $b;
|
|
var_dump($b);
|
|
|
|
function f() {
|
|
$a = array();
|
|
$a[0] = $a;
|
|
var_dump($a);
|
|
$b = array(array());
|
|
$b[0][0] = $b;
|
|
var_dump($b);
|
|
}
|
|
f();
|
|
?>
|
|
--EXPECT--
|
|
array(1) {
|
|
[0]=>
|
|
array(0) {
|
|
}
|
|
}
|
|
array(1) {
|
|
[0]=>
|
|
array(1) {
|
|
[0]=>
|
|
array(1) {
|
|
[0]=>
|
|
array(0) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
array(1) {
|
|
[0]=>
|
|
array(0) {
|
|
}
|
|
}
|
|
array(1) {
|
|
[0]=>
|
|
array(1) {
|
|
[0]=>
|
|
array(1) {
|
|
[0]=>
|
|
array(0) {
|
|
}
|
|
}
|
|
}
|
|
}
|