1--TEST-- 2Bug GH-9916 001 (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 try { 8 print "Before suspend\n"; 9 Fiber::suspend(); 10 print "Not executed"; 11 yield; 12 } finally { 13 print "Finally\n"; 14 } 15 print "Not executed"; 16})(); 17$fiber = new Fiber(function() use ($gen, &$fiber) { 18 $gen->current(); 19 print "Not executed"; 20}); 21$fiber->start(); 22?> 23==DONE== 24--EXPECT-- 25Before suspend 26==DONE== 27Finally 28