On Tue, 2008-04-29 at 17:43 +0200, Stefan Walk wrote: > On Tuesday 29 April 2008 15:34:07 Sam Barrow wrote: > > > This will not work, I get an error that the two must be compatible. > > Wouldn't it be a good idea to allow any type hint for a parameter that > > does not specify a type hint? > > That would be a bad idea, because it violates a (in my opinion, the) core > principle of OO: If B inherits from A, anything I can do with A (i.e. pass an > int to the method go) I can do with B. > http://en.wikipedia.org/wiki/Liskov_substitution_principle
Yes this was my only doubt about it. > Regards, > Stefan > > P.S. Sorry if this pops up twice, used the wrong from: address at first ... > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php