Re: Interface inheritance
| From: | Zeev Suraski | Date: | Mon, 19 Apr 2004 10:04:30 +0000 |
| Subject: | Re: Interface inheritance | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-9366@lists.php.net to get a copy of this message | ||
At 13:01 19/04/2004, Christian Schneider wrote:
Zeev Suraski wrote: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. ZeevAny 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)?