Re: [RFC] Namespace-scoped declares, again

From: Date: Wed, 14 Aug 2019 10:11:48 +0000
Subject: Re: [RFC] Namespace-scoped declares, again
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.internals 
Request: Send a blank email to internals+get-106591@lists.php.net to get a copy of this message
On 14/08/2019 11:07, Michał Brzuchalski wrote:
Exactly so how would it know from string name either it should load class from src/Foo.php or src/__nsmeta.php if there is no information?
It wouldn't. It would include src/Foo.php, and that would have the definition of something with the name "Foo" - either a class, an interface, a trait, or a package. If it wasn't what the engine was expecting, it would be an error, just as it is right now if you write "implements ClassName", or "new TraitName();" Regards, -- Rowan Collins [IMSoP]

« previous php.internals (#106591) next »