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

From: Date: Sun, 04 Aug 2024 18:37:35 +0000
Subject: Re: [RFC] Add Directive to Make All Namespaced Function Calls Global
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-124750@lists.php.net to get a copy of this message
> My thought was that it would have some clean and simple syntax, like: > > namespace foo using global functions; > class MyClass{ > > } > > When the parser hits that token, it just sets a flag and acts like > every unqualified classname has a backslash in front of it. > > For everyone else: > > namespace foo; > class MyClass{ > > } > > ...would still work exactly the same as it does now. And would keep > BC. Edit: Meant to say "function name" not "class name", sorry.

« previous php.internals (#124750) next »