1--TEST-- 2Test unfinished fiber with nested try/catch blocks 3--EXTENSIONS-- 4fiber 5--FILE-- 6<?php 7 8$fiber = new Fiber(function (): void { 9 try { 10 try { 11 try { 12 echo "fiber\n"; 13 echo Fiber::suspend(); 14 echo "after await\n"; 15 } catch (Throwable $exception) { 16 echo "inner exit exception caught!\n"; 17 } 18 } catch (Throwable $exception) { 19 echo "exit exception caught!\n"; 20 } finally { 21 echo "inner finally\n"; 22 } 23 } finally { 24 echo "outer finally\n"; 25 } 26 27 echo "unreached\n"; 28 29 try { 30 echo Fiber::suspend(); 31 } finally { 32 echo "unreached\n"; 33 } 34 35 echo "end of fiber should not be reached\n"; 36}); 37 38$fiber->start(); 39 40unset($fiber); // Destroy fiber object, executing finally block. 41 42echo "done\n"; 43 44?> 45--EXPECT-- 46fiber 47inner finally 48outer finally 49done 50