Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66586 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42786 invoked from network); 11 Mar 2013 12:55:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Mar 2013 12:55:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=lobbyjones@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=lobbyjones@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.48 as permitted sender) X-PHP-List-Original-Sender: lobbyjones@gmail.com X-Host-Fingerprint: 209.85.213.48 mail-yh0-f48.google.com Received: from [209.85.213.48] ([209.85.213.48:45315] helo=mail-yh0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9D/DA-09030-D54DD315 for ; Mon, 11 Mar 2013 07:55:58 -0500 Received: by mail-yh0-f48.google.com with SMTP id q12so583207yhf.21 for ; Mon, 11 Mar 2013 05:55:55 -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:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=J3mKllyL4/IyrS+ao1jFsWjzEIiD1O/8eSm1jweECoE=; b=wcVjLJwlYLZ+pJqPsELcCLV7TyVEbE0aLH90hLejs8cSbZWpFZIsTJ10zhxVxVEyYP n9pjFRFIMv+zKFhanm7++YGA8wIOjnLx7thRoF60qiK3YDyFMziqpFzdjGgxMHfV9erS hE4x7Lc8FPrm7QFNzLr4+NIQ02gUu4WY/YPC3QFjO4wKE1Lnn4zcf0Uq0YRhrRBf4FYw ux+bT8wUB3c6+Ezd+UAYKJzudl8mSS1bkl+DyL4FagllNUNxppLlLqWM7ZOjiB1Q82XY UuMThfDVBVp7nlXZw8GD9MtgHy2TEeDCzDVuKz6sd3B5tbMWZHvEmrhQ7D5toc4fMl6f T/Cw== X-Received: by 10.236.121.42 with SMTP id q30mr8961661yhh.24.1363006555177; Mon, 11 Mar 2013 05:55:55 -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 s74sm23553148yhh.5.2013.03.11.05.55.53 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 11 Mar 2013 05:55:54 -0700 (PDT) Message-ID: <513DD458.7040705@gmail.com> Date: Mon, 11 Mar 2013 08:55:52 -0400 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130221 Thunderbird/17.0.3 MIME-Version: 1.0 To: =?UTF-8?B?w4FuZ2VsIEdvbnrDoWxleg==?= CC: internals@lists.php.net References: <513DBDD4.3010804@gmail.com> <513DCBBF.8020809@gmail.com> In-Reply-To: <513DCBBF.8020809@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Double-Colon Always Follows the 'parent' Keyword? From: lobbyjones@gmail.com (Eric James Michael Ritz) On 03/11/2013 08:19 AM, Ángel González wrote: > On 11/03/13 12:19, Eric James Michael Ritz wrote: >> [...] >> >> 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; >> >> [...] >> >> 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? > > Hello Eric > > Wouldn't it be simpler to check that parent if preceded by > whitespace/brackets? Checking if it's followed by the paamayim > nekudotayim, seems also ok. Thanks for the idea. Checking for brackets would work but not whitespace since PHP allows programmers to write code such as echo $this-> parent; // Same as $this->parent So perhaps checking for paamayim nekudotayim would be best. -- ejmr 南無妙法蓮華經