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
524 B
PHP
28 lines
524 B
PHP
--TEST--
|
|
Backtrace in with object as fiber callback
|
|
--FILE--
|
|
<?php
|
|
|
|
class Test
|
|
{
|
|
public function __invoke(string $arg): void
|
|
{
|
|
Fiber::suspend();
|
|
throw new Exception($arg);
|
|
}
|
|
}
|
|
|
|
$fiber = new Fiber(new Test);
|
|
|
|
$fiber->start('test');
|
|
|
|
$fiber->resume();
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Exception: test in %sbacktrace-object.php:%d
|
|
Stack trace:
|
|
#0 [internal function]: Test->__invoke('test')
|
|
#1 %sbacktrace-object.php(%d): Fiber->resume()
|
|
#2 {main}
|
|
thrown in %sbacktrace-object.php on line %d
|