php / 8.1.5 / fiber.getcurrent.html /

Fiber::getCurrent

(PHP 8 >= 8.1.0)

Fiber::getCurrentGets the currently executing Fiber instance

Description

public static Fiber::getCurrent(): ?Fiber

Parameters

This function has no parameters.

Return Values

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

© 1997–2021 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/fiber.getcurrent.php