Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33431 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1937 invoked by uid 1010); 26 Nov 2007 05:43:44 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 1922 invoked from network); 26 Nov 2007 05:43:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Nov 2007 05:43:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=lars@strojny.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=lars@strojny.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain strojny.net designates 85.10.204.248 as permitted sender) X-PHP-List-Original-Sender: lars@strojny.net X-Host-Fingerprint: 85.10.204.248 milch.schokokeks.org Received: from [85.10.204.248] ([85.10.204.248:36826] helo=milch.schokokeks.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A4/84-63037-A0D5A474 for ; Mon, 26 Nov 2007 00:43:41 -0500 Received: from [192.168.0.8] (xdsl-87-78-221-250.netcologne.de [::ffff:87.78.221.250]) (AUTH: PLAIN lars@schokokeks.org, SSL: TLSv1/SSLv3,256bits,AES256-SHA) by milch.schokokeks.org with esmtp; Mon, 26 Nov 2007 06:43:35 +0100 id 0000000000020003.00000000474A5D07.00000459 To: internals@lists.php.net In-Reply-To: <47415CCF.5060800@avalon.aut.bme.hu> References: <474021AD.3020902@avalon.aut.bme.hu> <1195392958.4012.15.camel@johannes.nop> <47409635.9040304@digitalsandwich.com> <47412B11.6030804@zend.com> <474144B3.3040700@avalon.aut.bme.hu> <47415443.4070203@zend.com> <47415CCF.5060800@avalon.aut.bme.hu> Date: Mon, 26 Nov 2007 06:43:34 +0100 Message-ID: <1196055814.4060.9.camel@localhost> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=_milch.schokokeks.org-1113-1196055815-0001-2" X-Mailer: Evolution 2.12.1 Subject: Re: [PHP-DEV] late static binding php6 From: lars@strojny.net (Lars Strojny) --=_milch.schokokeks.org-1113-1196055815-0001-2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, Am Montag, den 19.11.2007, 10:52 +0100 schrieb Hodicska Gergely: [...] > I think the *behavior* of the two code blocks is confusing. And I=20 > *understand* that it can be stated in the manual that it works in this=20 > way, but *maybe* not this is the best solution. Why not something like this to fit both needs (I can think on scenarios for both): class ActiveRecord { public static function find($id) { echo get_called_class() . "\n"; } } class Something extends ActiveRecord { public static function find($id) { return parent::find($id); } } class ActiveRecord2 { sensitive public static function find($id) { echo get_called_class() . "\n"; } } class Something2 extends ActiveRecord { public static function find($id) { return parent::find($id); } } class Another extends Something2 { public static function find($id) { return parent::find($id); } } ActiveRecord::find(1); // "ActiveRecord" Something::find(2); // "ActiveRecord" ActiveRecord2::find(2); // "ActiveRecord2" Something2::find(1); // "Something2" =3D> parent method is sensitive Another::find(1); // "Something2" =3D> parent method is not sensitive cu, Lars --=20 =C2=BBDie Glorifizierung der pr=C3=A4chtigen underdogs l=C3=A4uft auf die des pr=C3=A4chtigen Systems heraus, das sie dazu macht.=C2=AB -- Theodor W. Adorno, =C2=BBMinima Moralia=C2=AB: They, the people Lars Strojny Nie=C3=9Fenstr. 36 51003 Cologne Jabber/Mail: lars@strojny.net Weblog: http://usrportage.de --=_milch.schokokeks.org-1113-1196055815-0001-2 Content-Type: application/pgp-signature; name="signature.asc" Content-Transfer-Encoding: 7bit Content-Description: Dies ist ein digital signierter Nachrichtenteil -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iQIVAwUAR0pc/CQPF+sCY6wHAQIKpRAAhB1MgpRE8D16QmutCxOxlH0VEXLCiKV4 wiJzjQgGYQEwFVM8NZxF/O9u5i92eV/SrWQWLVZXVmP5AexL/InycBubI7rYHiIa 5k3qKHKNiLerkdDssYXdaVoGMG8Un1IBXfXy8Ru3UyCxQknaRHTwSy5CCfExPLxr jFDKB6Cv13rSNt5WOhx+81fHKSQSYp9ZOrRLisP9113TU7m2wt/3ITQKmnz4FYDr 6o46T26+8Sfhe/VAfSBXqsMYQCLi/qHML+AL27XFtvY14Kdsq+6TQ/CB8qEQVA/2 fAxqBVX4M83L8FEkSlBXc0yJPzjFtA3TWDUpDx6A+5o/l/+bnIfep26OJZYCaVfs rHSIIA8hyFcMW1ns+KwXLyYfrjc0kpo/X1ezTfdj9LPkBTSlJhQLMVx6QnjHFSEh XZ3HhILxEoJT11Ytwl+ZJZrUYI38o41pWO2iK0sRUq3cqO5efz0VqjqufiGmcTiz wIVR0MlYrXtXdApS0fOaB7xCpGTIM3fEPCh+G1XPsdg9eHLZhme8PRDNmZmppa+M Ix+W7DcLtIovSSVHRXMlCNbp8RiTJr6FJ+QhtvxWPmfrRQLBVrzuwnU/h8G8ariO IuDI5/2quoS5Q1N5YDfJS6KtmJA7ZLZA73JK10Pj50rbALHa7SxZPRAdBiCQkTo0 RFXPzkp4lFQ= =+b0O -----END PGP SIGNATURE----- --=_milch.schokokeks.org-1113-1196055815-0001-2--