I also thought about the same for functions, just to be even more
consistent.
my_func::function

On 12 Oct 2017 23:32, "Sara Golemon" <poll...@php.net> wrote:

> On Thu, Oct 12, 2017 at 2:33 PM, Michael Döhler <michaeldoeh...@me.com>
> wrote:
> > I am open for any approach, but maybe we have to differentiate between
> class constants and method references?
> >
> Given the discussion we had around the namespace separator (and why we
> DIDN'T go with ::), there may be similar issues here.  Maybe not,
> given the final component is specifically T_METHOD, but it should be
> prototyped to be sure.
>
> As to what such a reference would evaluate to:   Foo::bar::method -> [
> Foo::class, 'bar' ] as Michael Döhler suggests seems the obvious
> answer, but (Foo::class.'::bar') may be what some would expect.
> Ideally we'd have first-class references to functions.
>
> -Sara
>

Reply via email to