Re: [apc] patch to fix class inherit duplicate method opcode bug

From: Date: Tue, 15 Feb 2005 02:53:16 +0000
Subject: Re: [apc] patch to fix class inherit duplicate method opcode bug
References: 1 2 3  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-1997@lists.php.net to get a copy of this message
Xuefer wrote:
On Mon, 14 Feb 2005 10:06:44 -0800, Rasmus Lerdorf <rasmus@lerdorf.com> wrote:
Could you clarify a bit what you are trying to fix? Is it this situation? file A defines class A file B has class B which extends A
and file C has class C which extends B don't know why it has to be 3 classes instead of 2 i can give example again if you need it
Are you sure? I don't see anything in the code that would make it work for 2.
If you update a method in file A in class A then calling this method from an instantiate B object ends up calling the original method as it was prior to the update since all the methods from A is copied into B at compile time.
also waste of memory bcompiler and other pecl projects in http://pecl.php.net/packages.php?catpid=25&catname=PHP have same issue to separate class from parent
Well, it is more memory, sure, but the runtime speedup is probably worth it. It does complicate things for opcode caches and other tools playing at that level quite a bit though. -Rasmus

« previous php.pecl.dev (#1997) next »