Re: Re: namespace implementation (irritating warning and autoload)

From: Date: Sun, 06 Apr 2008 15:06:54 +0000
Subject: Re: Re: namespace implementation (irritating warning and autoload)
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-36821@lists.php.net to get a copy of this message
Hi Jessie,
Regarding the name resolution rules, I posted a patch a few months ago with what I think is a more reasonable lookup order (http://news.php.net/php.internals/34097 ), but did not get much feedback. Would you like to try it out? (let me know if it doesn't apply cleanly against the current PHP_5_3) I tested the patch and it works well for me.
I think if we want a predictable name resolution without speed loss this is the way to go. From an "aesthetic" point of view we could even add a PHP namespace (or even extension specific namespaces) and import all classes from the PHP namespace into the global namespace (to avoid BC break). This way one could use "use PHP::Exception" instead of "use ::Exception". But I'm perfectly happy with the patch as is. The patch didn't apply cleanly against current PHP_5_3. Therefore I attached an adapted version. Regards, Julian Reich

« previous php.internals (#36821) next »