Hello Christian, Saturday, March 1, 2008, 1:53:39 PM, you wrote:
> Hello Christian, Stanislav, > Friday, February 29, 2008, 6:44:44 PM, you wrote: >> Hi! >>> 1) The current checks are IMHO too strict regarding default values for >>> parameters: An inheriting class can add default values to a parameter >>> without breaking the protocol: >>> class A { function foo($x) { ... } } >>> class B extends A { function foo($x = 42) { ... } } >>> should be allowed. Only if there are fewer parameters in B::foo or if >> I think this makes sense. In fact, if B::foo() has less parameters it >> might be OK too, since B would just ignore extra parameters (and in fact >> it could do it anyway :) > Sounds fine to me. > Originally I thought of allowing fully correct protocol checks that would > have allowed to even change the type hints, as long as all rules are > followed. But we decided against this and instead went with a very strict > approach. Maybe it is time to limit the strictness and apply that part of > the patch. Johannes, who is sitting next to me, wrote a test and committed that part. Best regards, Marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php