Re: [RFC] Add Directive to Make All Namespaced Function Calls Global

From: Date: Sun, 04 Aug 2024 17:15:43 +0000
Subject: Re: [RFC] Add Directive to Make All Namespaced Function Calls Global
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi Nick

I find it a bit unfortunate that you gave my thread barely any time to
be discussed.

On Sun, Aug 4, 2024 at 1:42 PM Nick Lockheart <[email protected]> wrote:
>
> I would like to discuss and then vote on this proposal as a feature,
> without getting into any specifics of syntax.
>
> I propose that we vote yes/no on if there should be some way, whatever
> that way ends up being, to tell the parser to always treat unqualified
> function names as global.

This can be achieved in various ways. For example:

* Per-file, via declare(), new use syntax, or whatnot.
* Globally, through an INI setting.
* Via hard cut in a new PHP version, where a relative calls just stop
looking up local scope.
* By flipping lookup order, as proposed in my last thread.

One might be in favor of one approach but not others. Of course,
everybody will be in favor of a "free" 2-4% speedup. Hence, a yes vote
won't mean much.

Ilija


Thread (97 messages)

« previous php.internals (#124740) next »