xref: /PHP-8.4/Zend/tests/fibers/double-start.phpt (revision c276c16b)
1--TEST--
2Start on already running fiber
3--FILE--
4<?php
5
6$fiber = new Fiber(function (): void {
7    Fiber::suspend();
8});
9
10$fiber->start();
11
12$fiber->start();
13
14?>
15--EXPECTF--
16Fatal error: Uncaught FiberError: Cannot start a fiber that has already been started in %sdouble-start.php:%d
17Stack trace:
18#0 %sdouble-start.php(%d): Fiber->start()
19#1 {main}
20  thrown in %sdouble-start.php on line %d
21