Timm Friebe wrote:
On Wed, 2004-02-25 at 23:44, Marcus Boerger wrote:

Hello Timm,

i had the same expirience today too. And also for me it makes not much
sense. The constructor shouldn't check inheritance rules.


Neither should other methods follow this. What if I want to add a
non-default parameter to an overriden method?


Yes, I think this is the same issue that I brought up earlier related to interfaces. I brought it up then as an inconsistency -- i.e. that you couldn't override methods in interfaces & hence using interfaces was limiting the OO inheritance that PHP supported when not using interfaces. In brief the issue was that if you extend a class that implemented an interface the extending class (subclass) had to also implement the parent class' interface and was therefore not allowed to override methods (w/ incompatible signatures) -- and not allowed to implement a different interface which itself might specify incompatible signatures.


It seems now that PHP is no longer inconsistent, but it also seems that it is impossible to override methods w/ incompatible signature. Is that a correct assessment? This is a pretty big difference from PHP4, then. Personally, I can live with it :) -- just want to make sure I understand it correctly.

Thanks,
Hans

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



Reply via email to