Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66581 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27476 invoked from network); 11 Mar 2013 11:19:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Mar 2013 11:19:54 -0000 Authentication-Results: pb1.pair.com header.from=lobbyjones@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=lobbyjones@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.53 as permitted sender) X-PHP-List-Original-Sender: lobbyjones@gmail.com X-Host-Fingerprint: 209.85.213.53 mail-yh0-f53.google.com Received: from [209.85.213.53] ([209.85.213.53:39441] helo=mail-yh0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A2/38-09030-ADDBD315 for ; Mon, 11 Mar 2013 06:19:54 -0500 Received: by mail-yh0-f53.google.com with SMTP id q3so564355yhf.26 for ; Mon, 11 Mar 2013 04:19:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=4jAmb5FKmCG4njSkvdVyIF3watREcDp5y/PD2zvwdts=; b=YvQqd02maw29MuZpLSfGxvF84nP5/EJC3foaknJajmbZGsBxlkoAAH8ppOA1D0Jr0w Iu/1nD6QTecvBzoU8eXU8G3EtGgeJdFPWYWILd9N3RpvlpRZkboKuqoxmH0IkFrYrI3o J7+/qP2ZOj/2BcRr1zTJxLX+eVivCqR1qaaaxQxl0yKXQbBeqYDkmAYn+MbgPN16GLUN Gg20/1Z7W5jXBUy2uvlq8EqSAFOMQpm/Qyz/ygm+Byza5sR3i1gsqG7xCPT8z2+wE94y pXYffMX8943HbTvkZxn2OuZpBb/z7Pj9EhXox5ce4AFaZ74aZQZi3FHMdcTCqyRup1gN mPRQ== X-Received: by 10.236.171.201 with SMTP id r49mr5328778yhl.148.1363000791319; Mon, 11 Mar 2013 04:19:51 -0700 (PDT) Received: from [192.168.1.102] (75-137-107-71.dhcp.gnvl.sc.charter.com. [75.137.107.71]) by mx.google.com with ESMTPS id u41sm23140765yhb.20.2013.03.11.04.19.49 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 11 Mar 2013 04:19:50 -0700 (PDT) Message-ID: <513DBDD4.3010804@gmail.com> Date: Mon, 11 Mar 2013 07:19:48 -0400 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130221 Thunderbird/17.0.3 MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Double-Colon Always Follows the 'parent' Keyword? From: lobbyjones@gmail.com (Eric James Michael Ritz) Hello everyone, I have a question about the internals of PHP, but this is not about advancing the development of the language, so I apologize if this is on the wrong list. I am choosing to post to this list because I believe the people here are most qualified to answer my question. This is what I want to know: Is there any valid situation in PHP where the ‘parent’ keyword is not followed by the scope-resolution operator? I am asking to help me decide on the best way to fix a bug for php-mode[1] for GNU Emacs. Consider these three lines: echo $parent; echo parent::$foo; echo $this->parent; Emacs correctly highlights the first ‘parent’ as a variable name. It also highlights ‘parent’ in the second line as a keyword, as it should. But in the third line it treats ‘parent’ as a keyword instead of a variable and applies the wrong syntax formatting. My idea to fix this problem is to only treat ‘parent’ as a keyword if the scope-resolution operator immediately follows it. But before doing that I want to know whether or not that is true. So is there are valid situation where the keyword ‘parent’ does not have ‘::’ after it? Thank you in advanced for any advice and help. [1]: https://github.com/ejmr/php-mode -- ejmr 南無妙法蓮華經