在定义匿名函数时,关键字“静态”是什么意思?

时间:2016-03-24 17:03:45

标签: php promise guzzle

在学习guzzlehttp时,我注意到在匿名函数之前使用static关键字的代码。 Phpstorm在static之前和之后显示错误,似乎编辑也很困惑:)

$value->then(
    static function ($value) use ($handlers) {
        ...
    },
    static function ($reason) use ($handlers) {
        ...
    }
);

这是什么意思,通常的匿名函数有什么区别?

0 个答案:

没有答案
相关问题