At 13:01 19/04/2004, Christian Schneider wrote:Zeev Suraski wrote:Any method that implements (directly or indirectly) an interface method or an abstract method, will have implementation checks fully enforced, with an E_COMPILE_ERROR emitted in case of an error.
Excuse my ignorance: What is defined as fully implementing the interface? I guess all methods have to be implemented with all the parameters having the same type if specified, right? What about extending the parameter set, especially with default values?
E.g. is foo(A $a, $newparam = 'false) valid for foo(A $a)?
This is valid. As long as you *can* call the function using the same prototype as the one in the interface, it's considered to be compatible. You can extend it using default values.
+1 from a user's perspective, that is pro fatal errors on interfaces and abstract methods but not on regular methods. That's the best balance on keeping BC and introducing useful OO features.
Jan.
-- http://www.horde.org - The Horde Project http://www.ammma.de - Neue Wege des Lernens http://www.tip4all.de - Deine private Tippgemeinschaft
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php