mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00

The start/resume/throw execute_data is now attached as the prev_execute_data to the bottom frame of the fiber stack when the fiber is running.
28 lines
520 B
PHP
28 lines
520 B
PHP
--TEST--
|
|
Backtrace in nested function call
|
|
--FILE--
|
|
<?php
|
|
|
|
function suspend_fiber(): void
|
|
{
|
|
\Fiber::suspend();
|
|
throw new Exception;
|
|
}
|
|
|
|
$fiber = new Fiber(function (): void {
|
|
suspend_fiber();
|
|
});
|
|
|
|
$fiber->start();
|
|
|
|
$fiber->resume();
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Exception in %sbacktrace-nested.php:%d
|
|
Stack trace:
|
|
#0 %sbacktrace-nested.php(%d): suspend_fiber()
|
|
#1 [internal function]: {closure}()
|
|
#2 %sbacktrace-nested.php(%d): Fiber->resume()
|
|
#3 {main}
|
|
thrown in %sbacktrace-nested.php on line %d
|