1--TEST-- 2Fiber::getReturn() after a fiber throws 3--EXTENSIONS-- 4fiber 5--FILE-- 6<?php 7 8$fiber = new Fiber(fn() => throw new Exception('test')); 9 10try { 11 $fiber->start(); 12} catch (Exception $exception) { 13 echo $exception->getMessage(), "\n"; 14} 15 16$fiber->getReturn(); 17 18?> 19--EXPECTF-- 20test 21 22Fatal error: Uncaught FiberError: Cannot get fiber return value: The fiber threw an exception in %sget-return-after-throwing.php:%d 23Stack trace: 24#0 %sget-return-after-throwing.php(%d): Fiber->getReturn() 25#1 {main} 26 thrown in %sget-return-after-throwing.php on line %d 27