diff options
author | Dmitry Stogov <dmitry@php.net> | 2007-10-23 12:52:40 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2007-10-23 12:52:40 +0000 |
commit | 1530fe99c8e504603dcc5fef555d331066827539 (patch) | |
tree | cf46803dd8c34eeb32d74edef061ad9edd1c6b55 /Zend/tests/bug35163_3.phpt | |
parent | 8b8cd15428b5db4aedd81d4133b1aa646ccf527a (diff) | |
download | php-git-1530fe99c8e504603dcc5fef555d331066827539.tar.gz |
Fixed variations of bug #35163
Diffstat (limited to 'Zend/tests/bug35163_3.phpt')
-rwxr-xr-x | Zend/tests/bug35163_3.phpt | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Zend/tests/bug35163_3.phpt b/Zend/tests/bug35163_3.phpt new file mode 100755 index 0000000000..d2b3c25bfe --- /dev/null +++ b/Zend/tests/bug35163_3.phpt @@ -0,0 +1,39 @@ +--TEST-- +Bug #35163.3 (Array elements can lose references) +--FILE-- +<?php +$a = new stdClass; +$a->b = array(1); +$a->b[] =& $a->b; +$a->b[] =& $a->b; +$a->b[0] = 2; +var_dump($a); +$a->b = null; +$a = null; +?> +--EXPECT-- +object(stdClass)#1 (1) { + ["b"]=> + &array(3) { + [0]=> + int(2) + [1]=> + &array(3) { + [0]=> + int(2) + [1]=> + *RECURSION* + [2]=> + *RECURSION* + } + [2]=> + &array(3) { + [0]=> + int(2) + [1]=> + *RECURSION* + [2]=> + *RECURSION* + } + } +} |