On Wed, Jul 7, 2021 at 2:40 PM Ralph Schindler <ra...@ralphschindler.com> wrote:
>
>
>
> >
> > It would theoretically be:
> >
> >      $fn = MyController::myAction(...);
> >
> > It currently errors:
> >
> >> Fatal error: Uncaught Error: Non-static method MyController::myAction() 
> >> cannot be called statically
> >
> > I would be okay with allowing this, as long as it's bound before it's 
> > called.
>
> Could we do this for 8.1? Does something of this scope need an RFC?
>
> I started working up a patch over the weekend, it is 1/2 done (only 7
> failing tests).
>
> I would really like to see this behavior come in with the (...) syntax,
> as I see it as pretty valuable.
>
> -ralph

I think this requires an RFC. The behavior of
`MyController::myAction(...)` should align with
`Closure::fromCallable('MyController::myAction')`, and the latter is
forbidden today. We should use an RFC to support the behavior in both
places. We shouldn't try to sneak it in, especially as Nikita is
opposed.

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to