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