1--TEST--
2Fiber in shutdown function
3--EXTENSIONS--
4fiber
5--FILE--
6<?php
7
8register_shutdown_function(function (): void {
9    $fiber = new Fiber(function (): int {
10        Fiber::suspend(1);
11        Fiber::suspend(2);
12        return 3;
13    });
14
15    var_dump($fiber->start());
16    var_dump($fiber->resume());
17    var_dump($fiber->resume());
18    var_dump($fiber->getReturn());
19});
20
21?>
22--EXPECT--
23int(1)
24int(2)
25NULL
26int(3)
27