1--TEST--
2Suspend in force-closed fiber after shutdown
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
18echo "done\n";
19
20?>
21--EXPECTF--
22done
23
24Fatal error: Uncaught FiberExit: Fiber destroyed in %ssuspend-in-force-close-fiber-after-shutdown.php:%d
25Stack trace:
26#0 %ssuspend-in-force-close-fiber-after-shutdown.php(%d): Fiber::suspend()
27#1 [internal function]: {closure}()
28#2 {main}
29
30Next FiberError: Cannot suspend in a force-closed fiber in %ssuspend-in-force-close-fiber-after-shutdown.php:%d
31Stack trace:
32#0 %ssuspend-in-force-close-fiber-after-shutdown.php(%d): Fiber::suspend()
33#1 [internal function]: {closure}()
34#2 {main}
35  thrown in %ssuspend-in-force-close-fiber-after-shutdown.php on line %d
36