1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 13:01:02 +02:00
Files
archived-php-src/Zend/tests/fibers/debug-backtrace.phpt
Aaron Piotrowski 810fb59f66 Improve fiber backtraces
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.
2021-04-30 12:17:50 -05:00

22 lines
344 B
PHP

--TEST--
Print backtrace in fiber
--FILE--
<?php
function inner_function(): void
{
debug_print_backtrace();
}
$fiber = new Fiber(function (): void {
inner_function();
});
$fiber->start();
?>
--EXPECTF--
#0 inner_function() called at [%sdebug-backtrace.php:9]
#1 {closure}()
#2 Fiber->start() called at [%sdebug-backtrace.php:12]