Re: [PHP4BETA] Child function never get called

From: Date: Mon, 26 Jul 1999 23:17:25 +0000
Subject: Re: [PHP4BETA] Child function never get called
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-2821@lists.php.net to get a copy of this message
At 00:58 27/07/99 , Johan Isacsson wrote:
This is strange, the example i gave you actually echoes 2... But in the real program which is a bit more complex, it dont work, the child function dont get called. I saw some cvs info about iheritance with included files, all my classes are separate includes, could that have something to do with it? In that case, is it possible to get it? I would really need it :)
The problem you're describing sounds extremely weird, I can't really see how it may happen. The problem with classes and include files under some circumstances was a 'fatal' one, i.e., your script wouldn't work at all under some conditions. It's fixed now. However, that should have no affect on what you're describing. Right now, the only known bug we're aware of is that child constructors, if not explicitly written, default to their parent's constructor (which is the PHP 3.0 behavior). I'm pretty sure that what you're describing, the way you're describing it, can't happen. An object instanciated for a given class will use the function table for that given class, and not for that class's parent. I could be wrong of course, but I'm over 99% certain. If you have an example that reproduces the problem, try to cut it down as much as you can (cutting it down, as opposed to writing an test case from scratch, may take a bit more time, but will be easier on the long run), and send it to us. If you can't cut it down at all, send it to us the way it is, just so that we can see what's going on. No matter how complex the script is, testing what happens when a new object is instanciated is fairly easy for us. Thanks, Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/ For a PGP public key, finger bourbon@netvision.net.il

« previous php.version4 (#2821) next »