Hello you all.

As closures are objects, I'd be ok with $this->__invoke(), but it's not
possible because closures can be bound to other contexts.
>From the proposed solutions, the one that makes more sense to me is the
__CLOSURE__, because not only it does not need
the boilerplate that can be confusing about the usage of "use/as" but it
also shouts out for the ones reading the code that this
function is calling itself.

Best regards,
Erick

Em ter., 6 de jun. de 2023 às 11:26, Bruce Weirdan <weir...@gmail.com>
escreveu:

> On Sat, Jun 3, 2023 at 9:11 PM Dan Ackroyd <dan...@basereality.com> wrote:
> > I'm now opening the discussion for the Closure self-reference RFC:
> > https://wiki.php.net/rfc/closure_self_reference
>
> Looking at the syntax options on the RFC page, the following
> explanation is not clear to me:
>
> > * De-anonymize the function. This has a large aesthetic downside of
> appearing to create the closure variable in the scope that the closure is
> declared in, rather than internal to the closure scope.
>
> Does this mean that the variable wouldn't actually be created in the
> enclosing scope, but someone may *think* it would?
>
>
> --
>   Best regards,
>       Bruce Weirdan                                     mailto:
> weir...@gmail.com
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: https://www.php.net/unsub.php
>
>

Reply via email to