Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62745 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81216 invoked from network); 3 Sep 2012 14:51:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Sep 2012 14:51:23 -0000 Authentication-Results: pb1.pair.com smtp.mail=ivan.enderlin@hoa-project.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ivan.enderlin@hoa-project.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain hoa-project.net from 95.130.12.24 cause and error) X-PHP-List-Original-Sender: ivan.enderlin@hoa-project.net X-Host-Fingerprint: 95.130.12.24 host1.trois-doubles.net Linux 2.6 Received: from [95.130.12.24] ([95.130.12.24:47683] helo=host1.trois-doubles.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5B/FB-20751-9E3C4405 for ; Mon, 03 Sep 2012 10:51:22 -0400 Received: from Hwhost2.local (4-106.203-62.cust.bluewin.ch [62.203.106.4]) by host1.trois-doubles.net (Postfix) with ESMTPA id 9D3C92093AD for ; Mon, 3 Sep 2012 16:51:18 +0200 (CEST) Message-ID: <5044C3E6.8040202@hoa-project.net> Date: Mon, 03 Sep 2012 16:51:18 +0200 Reply-To: ivan.enderlin@hoa-project.net User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/17.0 Thunderbird/17.0a2 MIME-Version: 1.0 To: internals@lists.php.net Content-Type: multipart/alternative; boundary="------------000102000708030009020305" Subject: $obj->attr::method() is not allowed From: ivan.enderlin@hoa-project.net ("Ivan Enderlin @ Hoa") --------------000102000708030009020305 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hello, I would like to start with an example: a = new A(); } public function a ( ) { return $this->a; } public function f ( ) { return $this->a::foo(); } } $b = new B(); var_dump($b->f()); This is not possible. We have a parse error in B::f because $this->a::foo() is not a construction of the language. But we can write: $a = $this->a; $a::foo(); In the same way, we can't write: $this->a()::foo(); I would like to know why? Is it a compiler related issue or just an omission? Would it be interesting to fix it? Best regards. -- Ivan Enderlin Developer of Hoa http://hoa.42/ or http://hoa-project.net/ PhD. student at DISC/Femto-ST (Vesontio) and INRIA (Cassis) http://disc.univ-fcomte.fr/ and http://www.inria.fr/ Member of HTML and WebApps Working Group of W3C http://w3.org/ --------------000102000708030009020305--