ReflectionFunctionAbstract::getClosureThis
PHP function
Edit on GitHub ✎
(PHP 5 >= 5.4.0, PHP 7, PHP 8)
Returns the object which corresponds to $this inside a closure
Description
ReflectionFunctionAbstract::getClosureThis(): object|null
If the function is a non-static closure, get the object bound to $this inside the closure.
Parameters Parameters
Return Values
Return the object instance represented by $this inside the Closure. If the function is not a closure or if it has no $this null is returned instead.
See Also
ReflectionFunctionAbstract::getClosureCalledClassReflectionFunctionAbstract::getClosureScopeClass- language.oop5.late-static-bindings