1--TEST--
2Suspend in force-closed fiber
3--EXTENSIONS--
4fiber
5--FILE--
6<?php
7
8$fiber = new Fiber(function (): void {
9    try {
10        Fiber::suspend();
11    } finally {
12        Fiber::suspend();
13    }
14});
15
16$fiber->start();
17
18unset($fiber);
19
20?>
21--EXPECTF--
22Fatal error: Uncaught FiberExit: Fiber destroyed in %ssuspend-in-force-close-fiber.php:%d
23Stack trace:
24#0 %ssuspend-in-force-close-fiber.php(%d): Fiber::suspend()
25#1 [internal function]: {closure}()
26#2 {main}
27
28Next FiberError: Cannot suspend in a force-closed fiber in %ssuspend-in-force-close-fiber.php:%d
29Stack trace:
30#0 %ssuspend-in-force-close-fiber.php(%d): Fiber::suspend()
31#1 [internal function]: {closure}()
32#2 {main}
33  thrown in %ssuspend-in-force-close-fiber.php on line %d
34