xref: /php-src/Zend/zend_fibers.stub.php (revision 814a9327)
1<?php
2
3/** @generate-class-entries */
4
5/**
6 * @strict-properties
7 * @not-serializable
8 */
9final class Fiber
10{
11    public function __construct(callable $callback) {}
12
13    public function start(mixed ...$args): mixed {}
14
15    public function resume(mixed $value = null): mixed {}
16
17    public function throw(Throwable $exception): mixed {}
18
19    public function isStarted(): bool {}
20
21    public function isSuspended(): bool {}
22
23    public function isRunning(): bool {}
24
25    public function isTerminated(): bool {}
26
27    public function getReturn(): mixed {}
28
29    public static function getCurrent(): ?Fiber {}
30
31    public static function suspend(mixed $value = null): mixed {}
32}
33
34final class FiberError extends Error
35{
36    public function __construct() {}
37}
38