Re: Latest ZE2 changes

From: Date: Sat, 07 Dec 2002 15:48:57 +0000
Subject: Re: Latest ZE2 changes
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-92186@lists.php.net to get a copy of this message
At 17:02 07/12/2002, Marcus Börger wrote:
Hi Zeev, I have changed the test files and encountered some problems with the way you modified my patch: 1) private_002.phpt fails with 004- Fatal error: Call to private method pass::show() from context 'fail' in %s on line %d 004+ Fatal error: Call to public method fail::show() from context 'fail' in /usr/src/php4-HEAD/tests/classes/private_002.php on line 18
I see the problem. It should be fixed.
The new error message is wrong. We are trying to access pass::show and not fail::show(). 2) private_007.phpt and private_007b.phpt both fail with the message Fatal error: Cannot redeclare private bar::priv() as public foo::priv() That means the children know about their parents privates what is in contrast to our discussion. The reason they do is because you skipped the part of the patch where in zend_do_inheritance() a modified version of zend_hash_merge_ex() was used to prevent this. But you also do not search for the private method in the calling scope. In other words you mainly used the first version of my patch. So i tried to strip down zend_hash_merge_with_argument_if() to the portion we need and tried to skip copying zje privates. But since privates are no longer looked up in the calling scope this fails.
I implement PPP in a different way altogether (it's very loosely based on your patch, the actual implementation is very different), in order to avoid having two hash lookups for every method call. I left a comment in the code that says we may want to improve the error messages, but the current implementation is quite intentional - it's much more efficient.
3) You left in some snippets of the 'final' patch. Does this mean we are going to have final? A new patch is also available.
No, we're not going to add final, at least not for now. I may have forgotten to remove the scanner part of the patch but it's meaningless :) Zeev

« previous php.dev (#92186) next »