1--TEST--
2Test unfinished fiber with finally block
3--FILE--
4<?php
5
6$fiber = new Fiber(function (): void {
7    try {
8        echo "fiber\n";
9        echo Fiber::suspend();
10        echo "after suspend\n";
11    } catch (Throwable $exception) {
12        echo "exit exception caught!\n";
13    } finally {
14        echo "finally\n";
15    }
16
17    echo "end of fiber should not be reached\n";
18});
19
20$fiber->start();
21
22unset($fiber); // Destroy fiber object, executing finally block.
23
24echo "done\n";
25
26?>
27--EXPECT--
28fiber
29finally
30done
31