Re: RfC: rethink OO inheritance strictness
| From: | Pierre | Date: | Mon, 07 Aug 2006 11:06:41 +0000 |
| Subject: | Re: RfC: rethink OO inheritance strictness | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-25225@lists.php.net to get a copy of this message | ||
Hello,
On 8/7/06, Marcus Boerger <helly@php.net> wrote:
class Foo {This is exactly what has been proposed last week, add a keyword to the declaration to mark a method as strict. And I'm in favour of this solution. --Pierrepublic interface function myFoo($x) { echo $x; } // strict method signature enforced} class Bar extends Foo {public function myFoo() { echo "bar"; } // this would be E_FATAL} class Qux extends Foo {public interface function myFoo($x) { echo $x; } // this is okay.} Hmm i see some elegance here :-)