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