1--TEST-- 2Make sure exceptions are rethrown when throwing from fiber destructor 3--EXTENSIONS-- 4fiber 5--FILE-- 6<?php 7$fiber = new Fiber(function() { 8 try { 9 Fiber::suspend(); 10 } finally { 11 throw new Exception("Exception 2"); 12 } 13}); 14$fiber->start(); 15unset($fiber); 16throw new Exception("Exception 1"); 17?> 18--EXPECTF-- 19Fatal error: Uncaught FiberExit: Fiber destroyed in %s:%d 20Stack trace: 21#0 %s(%d): Fiber::suspend() 22#1 [internal function]: {closure}() 23#2 {main} 24 25Next Exception: Exception 2 in %s:%d 26Stack trace: 27#0 [internal function]: {closure}() 28#1 {main} 29 thrown in %s on line %d 30