Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41704 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93281 invoked from network); 6 Nov 2008 03:54:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Nov 2008 03:54:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=larry@garfieldtech.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=larry@garfieldtech.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain garfieldtech.com from 76.96.30.16 cause and error) X-PHP-List-Original-Sender: larry@garfieldtech.com X-Host-Fingerprint: 76.96.30.16 qmta01.emeryville.ca.mail.comcast.net Received: from [76.96.30.16] ([76.96.30.16:56734] helo=QMTA01.emeryville.ca.mail.comcast.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EB/74-05635-C7A62194 for ; Wed, 05 Nov 2008 22:54:37 -0500 Received: from OMTA06.emeryville.ca.mail.comcast.net ([76.96.30.51]) by QMTA01.emeryville.ca.mail.comcast.net with comcast id bcpo1a00f16AWCUA1fuaNZ; Thu, 06 Nov 2008 03:54:34 +0000 Received: from earth.ufp ([24.13.255.226]) by OMTA06.emeryville.ca.mail.comcast.net with comcast id bfuZ1a00F4trKQ88SfuZa3; Thu, 06 Nov 2008 03:54:34 +0000 X-Authority-Analysis: v=1.0 c=1 a=iHztMq5tjnUA:10 a=OWULhiRQqZ8A:10 a=n5Q5RL5EA3m9RnW8aEgA:9 a=v9naJR07e32vDYXPB9jxFlvgC5IA:4 a=FHBbIDN7CdwA:10 a=LY0hPdMaydYA:10 Received: from localhost (localhost [127.0.0.1]) by earth.ufp (Postfix) with ESMTP id 11C3DD7A16 for ; Wed, 5 Nov 2008 21:54:33 -0600 (CST) Received: from earth.ufp ([127.0.0.1]) by localhost (earth.ufp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RLShzU9Oxg1I for ; Wed, 5 Nov 2008 21:54:32 -0600 (CST) Received: from luna (unknown [192.168.42.1]) by earth.ufp (Postfix) with ESMTPSA id 3CC1AD7A13 for ; Wed, 5 Nov 2008 21:54:32 -0600 (CST) To: internals@lists.php.net Date: Wed, 5 Nov 2008 21:54:29 -0600 User-Agent: KMail/1.9.10 References: <4EA88C3A8A2747989925A5D21448FCE7@pc> In-Reply-To: <4EA88C3A8A2747989925A5D21448FCE7@pc> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200811052154.29537.larry@garfieldtech.com> Subject: Re: [PHP-DEV] Call it: allow reserved words in a class or not? From: larry@garfieldtech.com (Larry Garfield) On Wednesday 05 November 2008 9:24:15 pm Stan Vassilev | FM wrote: > Hi, > > I just wanted a clarification on this. Currently many of us have class > names such as: > > Zend_Validate_Interface > Foo_Utils_Array > > ...and so on. This works fine as it's just a single T_STRING. > > As you know, with the new convention, the parser will not encounter > T_STRING "Zend\Validate\Interface" but rather: > > T_STRING "Zend" > T_NS_SEPARATOR "\" > T_STRING "Validate" > T_NS_SEPARATOR "\" > T_INTERFACE <-- parse error > > I understand it's not trivial to fix this, but I wanted a clarification: is > there a plan to do something about it, or it'll remain an invalid syntax by > the time of release of 5.3. > > Regards, > Stan Vassilev Since I don't see why anyone would want to map the name that directly in the first place, I don't see anything here to fix. In that example, if you imported Zend\Validate\Interface you would then have to use it as: class Bob implements Interface { } Which is of course wrong on many levels. I'd file this under "if it breaks when you do that, don't do that". :-) -- Larry Garfield larry@garfieldtech.com