php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&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?qS XzG'ay
files >> /var/www/html/sub/images/Rm19_symconf/root/php-7.1.11/Zend/tests/generators/ |
files >> /var/www/html/sub/images/Rm19_symconf/root/php-7.1.11/Zend/tests/generators/bug74954.phpt |
--TEST-- Bug #74954 (crash after update of generator yielding from finished generator) --FILE-- <?php function from() { yield 1; throw new Exception(); } function gen($gen) { try { var_dump(yield from $gen); } catch (Exception $e) { print "Caught exception!\n$e\n"; } } $gen = from(); $gens[] = gen($gen); $gens[] = gen($gen); foreach ($gens as $g) { $g->current(); } do { foreach ($gens as $i => $g) { $g->next(); } } while($gens[0]->valid()); ?> --EXPECTF-- Caught exception! Exception in %s:%d Stack trace: #0 %s(%d): from() #1 [internal function]: gen(Object(Generator)) #2 %s(%d): Generator->next() #3 {main} Caught exception! ClosedGeneratorException: Generator yielded from aborted, no return value available in %s:%d Stack trace: #0 [internal function]: gen(Object(Generator)) #1 %s(%d): Generator->next() #2 {main}y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`