Hello Christian,

Wednesday, September 21, 2005, 10:37:01 PM, you wrote:

> Marcus Boerger wrote:
>> [EMAIL PROTECTED] /usr/src/PHP_5_1 $ php -r 'class T{function f($x){}} class 
>> U extends T{function f($x=2){}}'
>> make: `sapi/cli/php' is up to date.
>> 
>> Strict Standards: Declaration of U::f() should be compatible with that of 
>> T::f() in Command line code on line 1
>> [EMAIL PROTECTED] /usr/src/PHP_5_1 $ php -r 'class T{function f($x=1){}} 
>> class U extends T{function f($x=2){}}'
>> make: `sapi/cli/php' is up to date.
>> 
>> The above shows php is correct here.

> In my opinion Sean didn't ask whether PHP behaves that way but _why_.

The above example show that adding a default result value in a derived class
results in an incompatible signature while changing it works as expected.


Best regards,
 Marcus

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

Reply via email to