I agree with this point. The sub class is a valid entity in its own
right. The methods (and the parameters) it has are part of that class.
If they overwrite a parent class's method, then fine.  Instance of
either class would have different parameters for the same named
method.

If the sub class needs to call the parent then it can using parent::method();

On 21/07/06, Michael Wallner <[EMAIL PROTECTED]> wrote:
Hi (Marcus),

unfortunately I'm not very happy with the direction OO strictness takes
in PHP.  I'm sure I'm not alone and many people second this feeling.


Precisely, let's have a look at the following:

[EMAIL PROTECTED]:~/build/php-5.2-debug$ cli -d"error_reporting=8191" -r 'class 
c{function f(){}} class d extends c{function f($a){}}'
Strict Standards: Declaration of d::f() should be compatible with that of 
c::f() in Command line code on line 1

[EMAIL PROTECTED]:~/build/php-unicode-debug$ cli -d"error_reporting=8191" -r 
'class c{function f(){}} class d extends c{function f($a){}}'
Fatal error: Declaration of d::f() must be compatible with that of c::f() in 
Command line code on line 1


I *really* think that this enforcements are no good idea and
I _beg_ you that we leave this "area" to interfaces.


Regards,
--
Michael

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




--
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&amp;r=213474731
"Standing on the shoulders of some very clever giants!"

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

Reply via email to