xref: /PHP-8.2/Zend/tests/fibers/gh10437.phpt (revision 284c2932)
1--TEST--
2GH-10437 (Segfault/assertion when using fibers in shutdown function after bailout)
3--FILE--
4<?php
5
6register_shutdown_function(function (): void {
7    var_dump(Fiber::getCurrent());
8});
9
10$fiber = new Fiber(function (): never {
11    trigger_error('Bailout in fiber', E_USER_ERROR);
12});
13$fiber->start();
14
15?>
16--EXPECTF--
17Fatal error: Bailout in fiber in %sgh10437.php on line %d
18NULL
19