Hi! > The PHP manual says, regarding Interfaces, that the class implementing > the interface must use the exact same method signatures as are defined > in the interface. Not doing so will result in a fatal error.
I think this is mainly for practical reasons - when you compile class Bar, you may not know what SpecialClass and BaseClass are. This is not a problem for checking the calls - if by the time you get to the call they are still not known, you can be sure whatever you've got as a parameter is *not* instance of them. However, if you wanted to check if Bar properly implements Foo, you'd need to know relation between SpecialClass and BaseClass. So that makes the deal way more complex, especially given that you'd need to load SpecialClass and BaseClass in the middle of defining Bar, so what if they depend on Bar? -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php