php8.5
Home/ Manual/ predefined / fiber/ Fiber::getCurrent

Fiber::getCurrent

PHP function Edit on GitHub ✎

(PHP 8 >= 8.1.0)

Gets the currently executing Fiber instance

Description

Fiber::getCurrent(): Fiber|null

Parameters Parameters

Return Values

Returns the currently executing Fiber instance or null if this method is called from outside a fiber.

Source: language/predefined/fiber/getcurrent.xml · from the official PHP manual (php/doc-en)