Shouldn't be necessary. As there are 2 different methods, they should
be allowed different parameter signatures. If you want to extend a
method but hide original implementation, you can't change the
parameter signature. I'm on the opposite side of the fence to you it
seems!

On 21/07/06, Soenke Ruempler <[EMAIL PROTECTED]> wrote:
Derick Rethans <mailto:[EMAIL PROTECTED]> wrote on Friday, July 21, 2006
11:31 AM:

To be compatible, the only thing you have to do is adding standard
values to derived methods' parameters:

$ php -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 2

$ php -d"error_reporting=8191" -r 'class c{function f(){}} class d
extends c{function f($a = null){}}';
$ [no error]

This behaviour makes sense to me.

-soenke

--
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