mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
c276c16b66
RFC: https://wiki.php.net/rfc/fibers Closes GH-6875.
17 lines
418 B
PHP
17 lines
418 B
PHP
--TEST--
|
|
Throw into non-running fiber
|
|
--FILE--
|
|
<?php
|
|
|
|
$fiber = new Fiber(fn() => null);
|
|
|
|
$fiber->throw(new Exception('test'));
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught FiberError: Cannot resume a fiber that is not suspended in %sthrow-into-non-running-fiber.php:%d
|
|
Stack trace:
|
|
#0 %sthrow-into-non-running-fiber.php(%d): Fiber->throw(Object(Exception))
|
|
#1 {main}
|
|
thrown in %sthrow-into-non-running-fiber.php on line %d
|