1--TEST--
2Test throwing from fiber
3--FILE--
4<?php
5
6$fiber = new Fiber(function (): void {
7    Fiber::suspend('test');
8    throw new Exception('test');
9});
10
11$value = $fiber->start();
12var_dump($value);
13
14$fiber->resume($value);
15
16?>
17--EXPECTF--
18string(4) "test"
19
20Fatal error: Uncaught Exception: test in %sfailing-fiber.php:%d
21Stack trace:
22#0 [internal function]: {closure:%s:%d}()
23#1 %sfailing-fiber.php(%d): Fiber->resume('test')
24#2 {main}
25  thrown in %sfailing-fiber.php on line %d
26