CakeFest 2024: The Official CakePHP Conference

ReflectionFunctionAbstract::getClosureThis

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

ReflectionFunctionAbstract::getClosureThis返回本身的匿名函数

说明

public ReflectionFunctionAbstract::getClosureThis(): ?object

如果函数是非静态闭包,获取绑定到闭包内部 $this 的对象。

参数

此函数没有参数。

返回值

返回 $this 指向,产生错误返回 null

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top