Newsgroups: php.internals,php.internals Path: news.php.net Xref: news.php.net php.internals:20456 php.internals:20457 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39054 invoked by uid 1010); 25 Nov 2005 22:12:22 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 39039 invoked from network); 25 Nov 2005 22:12:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Nov 2005 22:12:22 -0000 X-Host-Fingerprint: 65.9.87.49 adsl-9-87-49.mia.bellsouth.net Received: from ([65.9.87.49:11356] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id F7/2F-56276-64C87834 for ; Fri, 25 Nov 2005 17:12:22 -0500 To: internals@lists.php.net,Marcus Boerger Message-ID: <43878C41.4030205@gmail.com> Date: Fri, 25 Nov 2005 17:12:17 -0500 User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 CC: internals@lists.php.net References: <7.0.0.16.2.20051124161240.0573e640@zend.com> <90.0E.56276.6D207834@pb1.pair.com> <200511251419.56809.pookey@pookey.co.uk> <57.B8.56276.65B27834@pb1.pair.com> <73998811.20051125204046@marcus-boerger.de> <438782C6.80008@gmail.com> <43878626.5060300@lerdorf.com> <512771162.20051125225926@marcus-boerger.de> In-Reply-To: <512771162.20051125225926@marcus-boerger.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 65.9.87.49 Subject: Re: [PHP-DEV] Re: PHP 5.1 (Or How to break tousands of apps out there) From: jrhernandez05@gmail.com (Jessie Hernandez) Hi Marcus, Marcus Boerger wrote: > Hello Jessie, > > that's only one case,go with consts. now try > $x = $y ? foo:bar:baz:stupid; > > now what? > > best regards > marcus > Here it'll fail. My patch is basically allowing colons inside the class/function/constant name, so whitespace here is _crucial_, i.e., the following example WOULD work: $x = $y ? foo:bar : baz:stupid; Notice the space between the middle colon. Here it correctly identifies the constants "foo:bar" and "baz:stupid". In the former case, it interpreted "foo:bar:baz:stupid" and got the semicolon before getting the ternary's colon, so it would produce a syntax error. This doesn't seem like an actual problem to me though. Even though I somehow managed to your example work, would you really want to accept spaghetti code like this to work? Having proper spacing here is important for clarity, and as a side effect of my patch, I am enforcing this code-cleanness (never thought of this effect before). Regards, Jessie