Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67238 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79790 invoked from network); 1 May 2013 00:17:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 May 2013 00:17:20 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@mindplay.dk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@mindplay.dk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mindplay.dk from 209.85.212.49 cause and error) X-PHP-List-Original-Sender: rasmus@mindplay.dk X-Host-Fingerprint: 209.85.212.49 mail-vb0-f49.google.com Received: from [209.85.212.49] ([209.85.212.49:34589] helo=mail-vb0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6B/5F-18873-F0F50815 for ; Tue, 30 Apr 2013 20:17:19 -0400 Received: by mail-vb0-f49.google.com with SMTP id 12so917574vbf.8 for ; Tue, 30 Apr 2013 17:17:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:x-gm-message-state; bh=uxcPA+hqozLFzHX7ZQwpjiQxxLjBWPouEmfLrG89D/U=; b=F9DLKj1+vsy20uStqIt1HORjGfkxS1CYTi7vvnbfcgJGgXAeF+UwkkbeCqPM+45fhk /X0Pvr4beEjnHvX370wSFd9SEoviDFcNwO+scDmynIlqNcOBqKcGjKUB38SxSdXS7h82 MzwPP/oGoNvZfaKQ2M02zy+F2LWPBxn9VInWnDRI6ORbRhJTM5cl2ADuYppELV+nFqI+ fWaRu69JQRsJohGZwfcbEz/mtbEEVYMeyecf1Qu1nDMf0l1vLmAHm0U1s3mJov7dl7UD 5Jgv1ZUIVpNVhX95blOXPzCbP1pU1ZJ3CKqP2Y5j7WXqFOF4BHCBOYrRCxZLxdqCTicl DfNw== MIME-Version: 1.0 X-Received: by 10.220.89.198 with SMTP id f6mr202400vcm.45.1367367436748; Tue, 30 Apr 2013 17:17:16 -0700 (PDT) Received: by 10.58.28.134 with HTTP; Tue, 30 Apr 2013 17:17:16 -0700 (PDT) In-Reply-To: <51805A00.4050803@lerdorf.com> References: <6245ED6B-2BF7-47B7-80C0-D3B3D8E0B312@strojny.net> <51803086.6020002@sugarcrm.com> <51805A00.4050803@lerdorf.com> Date: Tue, 30 Apr 2013 20:17:16 -0400 Message-ID: To: Rasmus Lerdorf Cc: Stas Malyshev , PHP internals Content-Type: multipart/alternative; boundary=047d7b343b42588cb204db9d0a82 X-Gm-Message-State: ALoCoQnubdGTAKGGdjld/L0xMr+d8iGpUkh6vBbDzrNw9kt4dP3EHFnHIv1wMEx/YeNIMHgNzM7z Subject: Re: [PHP-DEV] property de-referencing From: rasmus@mindplay.dk (Rasmus Schultz) --047d7b343b42588cb204db9d0a82 Content-Type: text/plain; charset=ISO-8859-1 Okay, that is a technical/implementation problem - and I'm not the guy who can answer than question. I was thinking there might be a mathematical (or other) operator that doesn't work without something in front of it to operate on, and I chose the ^ operator based on a wild guess, plus the following: > php -r "var_dump(4 ^ 8);" int(12) > php -r "var_dump(^ 8);" Parse error: syntax error, unexpected '^', expecting ')' in Command line code on line 1 > php -r "$foo = ^ 8;" Parse error: syntax error, unexpected '^' in Command line code on line 1 I don't know the parser guts, but I figured since using the ^ operator with nothing to operate on, causes a parser-error, that means the parser knows that this is currently *not* valid syntax? Which might mean that there's a way to turn this into valid syntax? I don't know. I also figured the ambiguity with a bitwise operator is minimal damage - bitwise operators are not one of the most commonly used features in high-level languages. If the asterisk (or some other character) offers and easier implementation path, whatever. On Tue, Apr 30, 2013 at 7:55 PM, Rasmus Lerdorf wrote: > On 04/30/2013 03:24 PM, Rasmus Schultz wrote: > > Are we really going to quibble about syntax? This adds nothing to this > > discussion. And as I explained earlier, the ^ operator is used for the > sake > > of discussion only - if it's more practical to use another character for > > this operator, I don't care what it looks like. > > The point is that there is no operator that fits and the reason you > didn't come up with one that didn't clash with something else. If this > can even be implemented, which doesn't seem all that certain without a > lot of messy changes, it should just be a reflection call. > > -Rasmus > --047d7b343b42588cb204db9d0a82--