backtrace-object.phpt 524 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. Backtrace in with object as fiber callback
  3. --FILE--
  4. <?php
  5. class Test
  6. {
  7. public function __invoke(string $arg): void
  8. {
  9. Fiber::suspend();
  10. throw new Exception($arg);
  11. }
  12. }
  13. $fiber = new Fiber(new Test);
  14. $fiber->start('test');
  15. $fiber->resume();
  16. ?>
  17. --EXPECTF--
  18. Fatal error: Uncaught Exception: test in %sbacktrace-object.php:%d
  19. Stack trace:
  20. #0 [internal function]: Test->__invoke('test')
  21. #1 %sbacktrace-object.php(%d): Fiber->resume()
  22. #2 {main}
  23. thrown in %sbacktrace-object.php on line %d