1--TEST--
2Fatal error within a nested fiber
3--FILE--
4<?php
5
6$fiber = new Fiber(function (): void {
7    $fiber = new Fiber(function (): void {
8        \Fiber::suspend(2);
9        trigger_error("Fatal error in nested fiber", E_USER_ERROR);
10    });
11
12    var_dump($fiber->start());
13
14    \Fiber::suspend(1);
15
16    $fiber->resume();
17});
18
19var_dump($fiber->start());
20
21$fiber->resume();
22
23?>
24--EXPECTF--
25int(2)
26int(1)
27
28Deprecated: Passing E_USER_ERROR to trigger_error() is deprecated since 8.4, throw an exception or call exit with a string message instead in %s on line %d
29
30Fatal error: Fatal error in nested fiber in %sfatal-error-in-nested-fiber.php on line %d
31