Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13782 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51912 invoked by uid 1010); 8 Nov 2004 10:19:24 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 49141 invoked from network); 8 Nov 2004 10:18:50 -0000 Received: from unknown (HELO jan.prima.de) (83.97.50.139) by pb1.pair.com with SMTP; 8 Nov 2004 10:18:50 -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:17:07 +0000 Date: Mon, 8 Nov 2004 11:18:33 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <15410470363.20041108111833@marcus-boerger.de> To: Timm Friebe CC: internals@lists.php.net In-Reply-To: <1099844772.320.6.camel@localhost> References: <1099844772.320.6.camel@localhost> 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 Timm, you won't be able to tell from inside __call() whether a static or non static method was meant. The same holds for __get() and __set(). Also if we start using such code we'd need a class constructor. Thus this dicussion is leading to the following set of new magics: __static_get __static_set __static_call __static_construct regards marcus p.s.: something usefull when it comes to aspect oriented programming Sunday, November 7, 2004, 5:26:12 PM, you wrote: > Hi, > is there any reason why __call shouldn't be invoked for static method > calls? > Reproduce > --------- > php5 -r 'class A { function __call($name, $args) { var_dump($name, > $args); } } A::foo();' > Actual result > ------------- > Fatal error: Call to undefined method A::foo() in Command line code on > line 1 > Expected result > --------------- > string(3) "foo" > array(0) { > } > - Timm -- Best regards, Marcus mailto:helly@php.net