1--TEST-- 2Bug GH-9916 010 (Entering shutdown sequence with a fiber suspended in a Generator emits an unavoidable fatal error or crashes) 3--FILE-- 4<?php 5$gen = (function() { 6 $x = new stdClass; 7 print "Before yield\n"; 8 yield from (function () { 9 $x = new stdClass; 10 print "Before yield 2\n"; 11 yield; 12 print "Before suspend\n"; 13 Fiber::suspend(); 14 })(); 15})(); 16 17$fiber = new Fiber(function () use ($gen, &$fiber) { 18 print "Before current\n"; 19 $gen->current(); 20 print "Before next\n"; 21 $gen->next(); 22 print "Not executed\n"; 23}); 24 25$fiber->start(); 26?> 27==DONE== 28--EXPECT-- 29Before current 30Before yield 31Before yield 2 32Before next 33Before suspend 34==DONE== 35