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

From: Date: Tue, 15 Feb 2005 07:21:22 +0000
Subject: Re: [apc] patch to fix class inherit duplicate method opcode bug
References: 1 2 3 4  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-1999@lists.php.net to get a copy of this message
On Mon, 14 Feb 2005 18:53:16 -0800, Rasmus Lerdorf <rasmus@lerdorf.com> wrote: > 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. nope, tested many times just now only 2 classes is needed, but 3 files required run a.sh, with wget b.php, no problem ctrl+c, touch *, run a.sh again but with wget c.php execute c.php first will require_once() a.php in c.php, instead of the one in b.php this is the difference and btw, include/require without "_once" will always gives h->opened_path=NULL. without absolute path, EG(included_files) is confused a.sh ============= #!/bin/sh while true; do cat << EOF > a.php <?php class a { function dummy() { } function test() { echo "a::test\n"; echo "date\n"; } } EOF sleep 5 wget http://...........b.php or c.php done b.php ================= <?php require_once("./a.php"); class b extends a { function dummy() { } } echo "<pre>=== in b.php\n"; echo "obj a ===\n"; $a = &new a(); $a->test(); echo "obj b===\n"; $b = &new b(); $b->test(); c.php ============== <?php require_once("./a.php"); require_once("./b.php"); ================= > > -Rasmus >

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