Rasmus Lerdorf wrote: > Pierre wrote: >> Hello, >> >> On 8/3/06, Rasmus Lerdorf <[EMAIL PROTECTED]> wrote: >> >>> I'm not all that keen on a new keyword for this. How about using an >>> interface to indicate strictness? Isn't this really what interfaces are >>> all about? >> >> I don't like new keywords either, but I don't see any alternative. I >> also think that interfaces are what should be used. But it seems that >> we are wrong, interfaces do not solve this issue, I'm still unsure >> about the reasons though... > > Well, currently they don't because they don't care about method > signatures, but they could be made to care. Are there reasons beyond that?
erm, interfaces do care about method signatures either that or my php5 install is magic: # php5 -r ' interface Foo { function bar($v, $k); } class Qux implements Foo { function bar() {} }' Fatal error: Declaration of Qux::bar() must be compatible with that of Foo::bar() in Command line code on line 2 # php5 -r ' interface Foo { function bar($v, $k); } class Qux implements Foo { function bar($a, $b, $c) {} }' Fatal error: Declaration of Qux::bar() must be compatible with that of Foo::bar() in Command line code on line 2 > > -Rasmus > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php