1--TEST-- 2Fiber::getReturn() after bailout 3--SKIPIF-- 4<?php 5$zend_mm_enabled = getenv("USE_ZEND_ALLOC"); 6if ($zend_mm_enabled === "0") { 7 die("skip Zend MM disabled"); 8} 9?> 10--FILE-- 11<?php 12 13register_shutdown_function(static function (): void { 14 global $fiber; 15 var_dump($fiber->getReturn()); 16}); 17 18$fiber = new Fiber(static function (): void { 19 str_repeat('X', PHP_INT_MAX); 20}); 21$fiber->start(); 22 23?> 24--EXPECTF-- 25Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) %sget-return-after-bailout.php on line %d 26 27Fatal error: Uncaught FiberError: Cannot get fiber return value: The fiber exited with a fatal error in %sget-return-after-bailout.php:%d 28Stack trace: 29#0 %sget-return-after-bailout.php(%d): Fiber->getReturn() 30#1 [internal function]: {closure:%s:%d}() 31#2 {main} 32 thrown in %sget-return-after-bailout.php on line %d 33