Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49966 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37265 invoked from network); 24 Oct 2010 23:04:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Oct 2010 23:04:08 -0000 Authentication-Results: pb1.pair.com header.from=colder@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=etienne@immomigsa.ch; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain immomigsa.ch from 94.103.100.39 cause and error) X-PHP-List-Original-Sender: etienne@immomigsa.ch X-Host-Fingerprint: 94.103.100.39 mailer.immomigsa.ch Linux 2.6 Received: from [94.103.100.39] ([94.103.100.39:50461] helo=mailer.immomigsa.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2F/57-17247-56BB4CC4 for ; Sun, 24 Oct 2010 19:04:06 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by mailer.immomigsa.ch (Postfix) with ESMTP id 6D0014B60DD4 for ; Mon, 25 Oct 2010 01:04:02 +0200 (CEST) X-Virus-Scanned: amavisd-new at immomigsa.ch Received: from mailer.immomigsa.ch ([127.0.0.1]) by localhost (mailer.immomigsa.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xBWQpcZmwOdj for ; Mon, 25 Oct 2010 01:04:01 +0200 (CEST) Received: from croustillant.local (79-158.105-92.cust.bluewin.ch [92.105.158.79]) by mailer.immomigsa.ch (Postfix) with ESMTPA id 29E594B60DD1 for ; Mon, 25 Oct 2010 01:04:01 +0200 (CEST) Received: by croustillant.local (Postfix, from userid 501) id 520FB17E9577; Mon, 25 Oct 2010 01:04:00 +0200 (CEST) Date: Mon, 25 Oct 2010 01:04:00 +0200 To: internals@lists.php.net Message-ID: <20101024230400.GC88594@croustillant.local> References: <20101024223825.GC19835@gerbil.thgnet.it> <4CC4B628.3060304@sugarcrm.com> <20101024225628.GB88594@croustillant.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101024225628.GB88594@croustillant.local> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: [PHP-DEV] BC break in 5.3.2 -> 5.3.3 with "parent::" and __call/__callStatic From: colder@php.net (Etienne Kneuss) On Oct 25 0:56:28, Etienne Kneuss wrote: > On Oct 24 15:41:44, Stas Malyshev wrote: > > Hi! > > > > >class Bar { > > > // override getFoo() to add some specific behaviour > > > public function getFoo() { > > > // do the specific stuff > > > parent::getFoo(); > > > } > > >} > > > > I think you meant Bar to extend ActiveRecord? But anyway, I think > > that this particular call should be done through __call, not > > __callStatic, since it's basically non-static call. The line between > > the two wasn't really well-defined in PHP (you could call static > > methods non-statically and vice versa) which is a pity but I think > > distinction can be made in this case. > > Exactly, if Bar::getFoo is not called statically, parent::getFoo() will > not be a static call, it should not get through __callStatic. > > Best, Oh, and #51176 seems bogus to me. "::" is not sufficient to indicate a static call, neither is "self::", "static::", or "Foo::". A call is only static if one of the two following conditions match: 1) the target method is declared as static 2) the call comes from an object-less scope > > > > > -- > > Stanislav Malyshev, Software Architect > > SugarCRM: http://www.sugarcrm.com/ > > (408)454-6900 ext. 227 > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > Etienne Kneuss > http://www.colder.ch > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- Etienne Kneuss http://www.colder.ch