Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35883 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68228 invoked by uid 1010); 2 Mar 2008 00:24:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 68213 invoked from network); 2 Mar 2008 00:24:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Mar 2008 00:24:50 -0000 Authentication-Results: pb1.pair.com header.from=truth@proposaltech.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=truth@proposaltech.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain proposaltech.com from 66.51.199.86 cause and error) X-PHP-List-Original-Sender: truth@proposaltech.com X-Host-Fingerprint: 66.51.199.86 exvs01.ex.dslextreme.net Windows 2000 SP4, XP SP1 Received: from [66.51.199.86] ([66.51.199.86:8733] helo=EXVS01.ex.dslextreme.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 83/18-11272-0D3F9C74 for ; Sat, 01 Mar 2008 19:24:49 -0500 Received: from 69.239.100.91 ([69.239.100.91]) by EXVS01.ex.dslextreme.net ([192.168.7.220]) via Exchange Front-End Server owa.dslextreme.net ([192.168.7.126]) with Microsoft Exchange Server HTTP-DAV ; Sun, 2 Mar 2008 00:27:01 +0000 Received: from inspiron by owa.dslextreme.net; 01 Mar 2008 16:24:44 -0800 To: internals@lists.php.net In-Reply-To: <1476108437.20080301203629@marcus-boerger.de> References: <234b196e0803011115t31dd004iba76f5d7ac9125b8@mail.gmail.com> <1476108437.20080301203629@marcus-boerger.de> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Sat, 01 Mar 2008 16:24:44 -0800 Message-ID: <1204417484.6084.25.camel@inspiron.local> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2 Subject: Re: [PHP-DEV] 5.2.5 and static calls From: truth@proposaltech.com (Todd Ruth) > > I compiled 5.2.5 last night and noticed that it effectively breaks all > > static calls which have no static keyword assigned in the function's > > definition (sorry, a bit clumsy here). .... How about waiting to break people's :: calls to non-static functions until some number of releases or amount of time after traits are introduced? For years, making :: calls to non-static functions has been the php way to write traits. (OK, this lacks a lot of the features of full traits, but it's better than nothing.) Isn't it fair to provide an alternative and some time to switch to the alternative before making the old way fatal? In case it isn't clear how you could write a trait, here's a silly example: (A full example would have more interesting code that would be re-used by a variety of objects, but this example demonstrates the key abilities of php without the distractions of doing something useful.) g()."\n"; } function f() { Trait::e(); } } class Obj { function g() { return 5; } function h() { Trait::f(); } } $o = new Obj; $o->h(); ?>