mirror of
https://github.com/php/php-src.git
synced 2026-04-20 22:41:20 +02:00
23 lines
353 B
PHP
23 lines
353 B
PHP
--TEST--
|
|
Test throwing into fiber
|
|
--FILE--
|
|
<?php
|
|
|
|
$fiber = new Fiber(function (): void {
|
|
Fiber::suspend('test');
|
|
});
|
|
|
|
$value = $fiber->start();
|
|
var_dump($value);
|
|
|
|
$fiber->throw(new Exception('test'));
|
|
|
|
?>
|
|
--EXPECTF--
|
|
string(4) "test"
|
|
|
|
Fatal error: Uncaught Exception: test in %sthrow.php:%d
|
|
Stack trace:
|
|
#0 {main}
|
|
thrown in %sthrow.php on line %d
|