1--TEST--
2Suspend in force-closed fiber, catching exception thrown from destructor
3--FILE--
4<?php
5
6try {
7    (function (): void {
8        $fiber = new Fiber(function (): void {
9            try {
10                Fiber::suspend();
11            } finally {
12                Fiber::suspend();
13            }
14        });
15
16        $fiber->start();
17    })();
18} catch (FiberError $exception) {
19    echo $exception->getMessage(), "\n";
20}
21
22echo "done\n";
23
24?>
25--EXPECT--
26Cannot suspend in a force-closed fiber
27done
28