Annotation of embedaddon/php/Zend/tests/bug35163_3.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #35163.3 (Array elements can lose references)
! 3: --FILE--
! 4: <?php
! 5: $a = new stdClass;
! 6: $a->b = array(1);
! 7: $a->b[] =& $a->b;
! 8: $a->b[] =& $a->b;
! 9: $a->b[0] = 2;
! 10: var_dump($a);
! 11: $a->b = null;
! 12: $a = null;
! 13: ?>
! 14: --EXPECTF--
! 15: object(stdClass)#%d (1) {
! 16: ["b"]=>
! 17: &array(3) {
! 18: [0]=>
! 19: int(2)
! 20: [1]=>
! 21: *RECURSION*
! 22: [2]=>
! 23: *RECURSION*
! 24: }
! 25: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>