Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51430 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53635 invoked from network); 4 Feb 2011 08:13:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Feb 2011 08:13:54 -0000 Authentication-Results: pb1.pair.com header.from=kontakt@beberlei.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=kontakt@beberlei.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain beberlei.de from 178.77.98.152 cause and error) X-PHP-List-Original-Sender: kontakt@beberlei.de X-Host-Fingerprint: 178.77.98.152 lvps178-77-98-152.dedicated.hosteurope.de Linux 2.6 Received: from [178.77.98.152] ([178.77.98.152:37815] helo=beberlei.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 90/00-53482-235BB4D4 for ; Fri, 04 Feb 2011 03:13:46 -0500 Received: by beberlei.de (Postfix, from userid 33) id 1605A6E090DA; Fri, 4 Feb 2011 09:13:09 +0100 (CET) To: Chris Stockton MIME-Version: 1.0 Date: Fri, 04 Feb 2011 09:13:09 +0100 Cc: In-Reply-To: References: <4D4B82DD.9040209@yahoo.com.au> <4D4B8637.2000807@lerdorf.com> Message-ID: <85c09a486c11ca98a4eb6d27934dcdad@beberlei.de> X-Sender: kontakt@beberlei.de User-Agent: RoundCube Webmail/0.3.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] A quick consensus on magic method idea From: kontakt@beberlei.de (Benjamin Eberlei) Couldn't you just write an autoloader that triggers this method if available on any class autoloaded? This obviously only works if you are using the one class in one file approach, but would be just as powerful then. On Thu, 3 Feb 2011 21:06:00 -0800, Chris Stockton wrote: > Hello, > > On Thu, Feb 3, 2011 at 8:53 PM, Rasmus Lerdorf wrote: >> >> This creates problems for opcode caches since the classes are all >> precompiled and usually optimized to the point where the opcodes that >> loads them are NOP'ed away and you just have the full class table cached >> in memory for each op_array.  Walking through that class table on every >> request and looking for these magic methods to call would be quite >> annoying, especially since most of them wouldn't have such a method to >> begin with. >> > > That is a good point and something I didn't think about. The pain that > would create immediately negates the small luxury it would add. > > Thanks, > > -Chris