On Thu, 25 Mar 2021 at 12:24, Nuno Maduro <enunomad...@gmail.com> wrote:

> Hi,
>
> Concerning the comments about what's exactly "auto-captured" by the scope
> of a multi-line short closure, we will be just reusing the "auto-capture"
> feature that already exists in one-line short closures. Therefore, this RFC
> doesn't have plans on changing the way "auto-capture" already works in PHP.
>

Absolutely, but allowing assignments in short closures increases their
complexity, and thus (in my opinion) erases the advantage of auto-capturing.

I know you can _also_ have assignments in short closures (because
assignments are just expressions in PHP), but it's much harder to come up
with short closure gotchas.

Reply via email to