Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13784 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60589 invoked by uid 1010); 8 Nov 2004 10:45:36 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 60451 invoked from network); 8 Nov 2004 10:45:36 -0000 Received: from unknown (HELO jan.prima.de) (83.97.50.139) by pb1.pair.com with SMTP; 8 Nov 2004 10:45:36 -0000 Received: from ZARNIWOOP (amf.hotels-on-air.de [::ffff:217.194.75.126]) (AUTH: LOGIN tobi) by jan.prima.de with esmtp; Mon, 08 Nov 2004 10:43:52 +0000 Date: Mon, 8 Nov 2004 11:45:24 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <129726745.20041108114524@marcus-boerger.de> To: Stanislav Malyshev CC: internals@lists.php.net In-Reply-To: References: <1099844772.320.6.camel@localhost> <15410470363.20041108111833@marcus-boerger.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] __call interceptor and static methods From: helly@php.net (Marcus Boerger) Hello Stanislav, Monday, November 8, 2004, 11:29:13 AM, you wrote: MB>>> you won't be able to tell from inside __call() whether a static or MB>>> non static method was meant. > Technically, it's not a big problem IMO - there could be an argument added > or some other solution, like presence of $this. Adding an argument would be a major BC but sure is_null($this) would work, only it would be another big slowdown. MB>>>non static method was meant. The same holds for __get() and __set(). MB>>>Also if we start using such code we'd need a class constructor. Thus MB>>>this dicussion is leading to the following set of new magics: MB>>> MB>>>__static_get MB>>>__static_set MB>>>__static_call MB>>>__static_construct > What do you mean by __static_construct? When do you expect it to be > called? And, BTW - if you need to override method calls, etc. for a > global object, why not to use singletons? I didn't say it is necessary :-) __static_construct would be called the first time the class is going to be used. Best regards, Marcus mailto:helly@php.net