php8.5
Home/ Manual/ reflection / reflectionfunctionabstract/ ReflectionFunctionAbstract::getClosureScopeClass

ReflectionFunctionAbstract::getClosureScopeClass

PHP function Edit on GitHub ✎

(PHP 5 >= 5.4.0, PHP 7, PHP 8)

Returns the class corresponding to the scope inside a closure

Description

ReflectionFunctionAbstract::getClosureScopeClass(): ReflectionClass|null

Returns the class as a ReflectionClass that corresponds to the scope inside the Closure.

Parameters Parameters

Return Values

Returns a ReflectionClass corresponding to the class whose scope is being used inside the Closure. If the function is not a closure or if it has global scope null is returned instead.

See Also

Source: reference/reflection/reflectionfunctionabstract/getclosurescopeclass.xml · from the official PHP manual (php/doc-en)