Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:8339 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98575 invoked by uid 1010); 3 Mar 2004 11:03:06 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 98550 invoked from network); 3 Mar 2004 11:03:05 -0000 Received: from unknown (HELO phoebe.host4u.net) (209.150.128.26) by pb1.pair.com with SMTP; 3 Mar 2004 11:03:05 -0000 Received: from ctdprimary (dsta-aa203.pivot.net [66.186.171.203]) by phoebe.host4u.net (8.11.6/8.11.6) with SMTP id i23B32P24338; Wed, 3 Mar 2004 05:03:02 -0600 Message-ID: <018301c4010f$65ffd9e0$f7dea8c0@cyberware.local> To: "Greg Beaver" Cc: References: <014501c400be$2190f1f0$f7dea8c0@cyberware.local> <4045553C.3080309@chiaraquartet.net> Date: Wed, 3 Mar 2004 06:05:11 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Subject: Re: [PHP-DEV] Re: more static method fun From: rrichards@ctindustries.net ("Rob Richards") From: Greg Beaver > The PEAR base class also has this design flaw in several methods. It > has caused nothing but annoying and unfixable bugs. The only good > solution is to redesign by splitting the methods into two methods, one > static, one not. It's best to do this before the stable label is > applied, unless you like getting the same valid bugs reported over and > over with different permutations :) Say dom load were split into 2 methods (this is not something that should be required to do). One static and one a regular public function. As shown with the simplexml example, the regular function would still not work correctly. The method I used in that example, is not a static method, but if called within another class method, it is allowed to be called using the static syntax (which is not allowed when called that way outside of a class scope), and it also picks up the scope of the object that is is called from (which is wrong). To top it off, behavior of the statically called method is also affected by the type of the class calling it (also shown there). Rob