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