Hey,

I'd like to come to some conclusion about the latest changes which break BC (trying to keep it short because some people here wrote long essays and it took me too much time to catch up :) :
a) I agree that it doesn't make much sense for constructors, because one always creates concrete classes.
b) I think we pretty much all agree that the change is correct but it might be a bit too aggressive for certain people (such as people using var_args) and definitely too aggressive for existing code.
c) Concerning the differentiating between interfaces and inheritance, in general, I believe these are exactly the same thing and should behave equally. However, we do have a luxury of doing whatever we want when it comes to interfaces and abstract classes because they didn't exist in PHP 4, though treating them differently than inheritance will be a bit inconsistent.
d) Last problem is that using E_STRICT is not a good idea because we find this problem at compile-time and the error_reporting might not be set yet.


What I suggest is the following:
a) Don't check signature for constructors.
b) By default, don't check signature for inheritance *if* we're not inheriting from an abstract class. If it is an abstract class we should check the signature because it's a PHP 5 feature.
c) Add a new INI option (zend.strict_inheritance_checks) which does check signature for methods (except for constructor). I don't like new INI options but I don't think there's any way out.


Comments? (Please try to keep them short :)

Andi

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to