Re: Docs for static closures
| From: | Stanislav Malyshev | Date: | Sun, 23 Aug 2015 23:13:53 +0000 |
| Subject: | Re: Docs for static closures | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969385865@lists.php.net to get a copy of this message | ||
Hi!
> I'd stumbled upon a static closure in a piece of code and failed to find
> anything in PHP docs that would put it as nicely as the answer on Stack
> Overflow by Anthony Ferrara did: ݬ
> G¡™GY÷D¶$Ý×êhttp://stackoverflow.com/a/23554571.
> The only place I found that mentioned static closures is
> http://php.net/manual/en/closure.bindto.php
>
> Is there a place that explains what a static closure is and how it works?
It is explained here for example:
https://github.com/php/php-langspec/blob/PHP-5.6/spec/10-expressions.md#anonymous-function-creation
But the manual seems to be indeed not up to date - probably
http://php.net/manual/en/functions.anonymous.php
needs to be expanded to
explain this.
--
Stas Malyshev
smalyshev@gmail.com