array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), 'this' => array ( 0 => 'fiber.suspend.php', 1 => 'Fiber::suspend', 2 => 'Suspends execution of the current fiber', ), 'up' => array ( 0 => 'class.fiber.php', 1 => 'Fiber', ), 'prev' => array ( 0 => 'fiber.isterminated.php', 1 => 'Fiber::isTerminated', ), 'next' => array ( 0 => 'fiber.getcurrent.php', 1 => 'Fiber::getCurrent', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'language/predefined/fiber/suspend.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PHP 8 >= 8.1.0)
Fiber::suspend — Suspends execution of the current fiber
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.
valueThe value to return from the call to Fiber::start(), Fiber::resume(), or Fiber::throw() that switched execution into the current fiber.
The value provided to Fiber::resume().