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