Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Fiber::isTerminatedFiber::getCurrent>
^FiberLast updated: Mon, 26 Oct 2026

Fiber::suspend

(PHP 8 >= 8.1.0)

Fiber::suspend — Suspends execution of the current fiber

Description

public static function Fiber::suspend(mixed $value = null): mixed

Suspends execution of the current fiber. The value provided to this method will be returned from the call to Fiber::start(), Fiber::resume(), or Fiber::throw() that switched execution into the current fiber.

When the fiber is resumed, this method returns the value provided to Fiber::resume(). If the fiber is resumed using Fiber::throw(), the exception given to that method will be thrown from the call to this method.

If this method is called from outside a fiber, a FiberError will be thrown.

Parameters

value

The value to return from the call to Fiber::start(), Fiber::resume(), or Fiber::throw() that switched execution into the current fiber.

Return Values

The value provided to Fiber::resume().


<Fiber::isTerminatedFiber::getCurrent>
^FiberLast updated: Mon, 26 Oct 2026