Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23636 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18756 invoked by uid 1010); 24 May 2006 18:56:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 18740 invoked from network); 24 May 2006 18:56:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 May 2006 18:56:10 -0000 X-PHP-List-Original-Sender: truth@proposaltech.com X-Host-Fingerprint: 68.142.198.203 smtp104.sbc.mail.mud.yahoo.com Received: from ([68.142.198.203:34674] helo=smtp104.sbc.mail.mud.yahoo.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id B5/92-19568-A4CA4744 for ; Wed, 24 May 2006 14:56:10 -0400 Received: (qmail 43056 invoked from network); 24 May 2006 18:56:05 -0000 Received: from unknown (HELO ?192.168.2.106?) (toddruth@sbcglobal.net@71.128.142.101 with login) by smtp104.sbc.mail.mud.yahoo.com with SMTP; 24 May 2006 18:56:05 -0000 Reply-To: truth@proposaltech.com To: Andi Gutmans , Edin Kadribasic , Marcus Boerger , internals@lists.php.net In-Reply-To: <7.0.1.0.2.20060515194051.02b32ef8@zend.com> References: <138663365.20060514205903@marcus-boerger.de> <038d01c676f8$ab9b3380$6602a8c0@foxbox> <44685D24.2000801@php.net> <1147708994.14148.23.camel@notebook.local> <16710545416.20060515202714@marcus-boerger.de> <1147721541.14148.47.camel@notebook.local> <4468DB43.1020005@emini.dk> <7.0.1.0.2.20060515194051.02b32ef8@zend.com> Content-Type: text/plain Date: Wed, 24 May 2006 11:56:06 -0700 Message-ID: <1148496966.19173.79.camel@notebook.local> Mime-Version: 1.0 X-Mailer: Evolution 2.4.0 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] fatal static call in php 6.0? From: truth@proposaltech.com (Todd Ruth) In php5 this works even without an instanceof relationship. (I'm running 5.1.2 and this test gets a "PASS" from run-tests.php.) I know the following test case does not even remotely follow good OO design principles, but it's hard to imagine us going back to the drawing board with our app. Please don't break the following in php6 just to teach me a lesson about OO design. If there's a repository of "someone will complain about a BC break if this changes" tests, please add the following: --TEST-- test that $this survives in a semi-static call --FILE-- x = 5; } } class Child extends TheParent { function f() { UglyUncle::f(); } } $c = new Child(); var_dump($c->x); $c->f(); var_dump($c->x); ?> --EXPECT-- int(3) int(5) Thanks, Todd On Mon, 2006-05-15 at 19:41 -0700, Andi Gutmans wrote: > I don't see why it has to be a fatal error. If there's an instanceof > relationship we can keep $this. If not, we should not pass $this > (which I believe we already do in PHP 5), in which case the author > would have to pass $this if he wants to change public properties. > > Andi > > At 12:49 PM 5/15/2006, Edin Kadribasic wrote: > >Todd Ruth wrote: > >>I don't see benefits of making semi-static fatal that make it > >>worth keeping those of us with large apps that depend on semi- > >>static from upgrading to php6. > > > >My sentiments exactly. OO purity/strictness do now work well with > >PHP's main strength -- its dynamicity. > > > >Edin > > > >-- > >PHP Internals - PHP Runtime Development Mailing List > >To unsubscribe, visit: http://www.php.net/unsub.php > -- Todd Ruth