PHP 8.4.2 Released!

Fiber::throw

(PHP 8 >= 8.1.0)

Fiber::throwResumes execution of the fiber with an exception

Опис

public Fiber::throw(Throwable $exception): mixed

Resumes the fiber by throwing the given exception from the current Fiber::suspend() call.

If the fiber is not suspended when this method is called, a FiberError will be thrown.

Параметри

exception

The exception to throw into the fiber from the current Fiber::suspend() call.

Значення, що повертаються

The value provided to the next call to Fiber::suspend() or null if the fiber returns. If the fiber throws an exception before suspending, it will be thrown from the call to this method.

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top