Re: T_IMPORT vs. T_USE

From: Date: Thu, 18 Oct 2007 12:39:17 +0000
Subject: Re: T_IMPORT vs. T_USE
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-32851@lists.php.net to get a copy of this message
Hi, On 10/18/07, Johannes Schlüter <johannes@php.net> wrote: > On Thu, 2007-10-18 at 12:08 +0200, Pierre wrote: > > I would prefer Stan's patch to allow keyword to be used as > > class/method/function name. At the very least (the patch has > > unsolvable issues), I have to agree with Andi, we should just go with > > "use" (codesearch returns less than 10 results :). > > The point about using "use" is that "use" is already a reserved keyword > in PHP - therefore we can't break anything by using "use" for > namespaces. Oh, I missed this point. So what are we waiting for to switch? It will ease our life to test our existing code under 5.3 without having to create specific branches (or breaking bc). >So in this single case we have a chance of using a keyword > withou breaking anything (while we still might break stuff due to the > "namespace" keyword) :-) The namespace keyword is less a problem than import. It is mostly used in areas where php5+ provides native solution (for example xml or soap like in ezpublish, mostly php4 code). --Pierre

« previous php.internals (#32851) next »