Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /tests/classes interface_class.phpt interface_doubled.phpt interface_implemented.phpt interface_instantiate.phpt interface_member.phpt interface_method.phpt interface_method_final.phpt interface_method_private.phpt interface_must_be_implemented.phpt

[email protected] (Shane Caraveo) Wed, 12 Mar 2003 12:12:53 -0800
Newsgroups php.dev
Message-ID <[email protected]>
Marcus B=F6rger wrote:
> At 20:20 12.03.2003, Andrei Zmievski wrote:
>=20
>> On Wed, 12 Mar 2003, Marcus B=F6rger wrote:
>> > This works even though i do not like  extends FOO.
>>
>> Why? Both C# and Java (AFAIR) allow interfaces to extend other
>> interfaces.
>=20
>=20
> Because of the second part of the answer. It is a little bit strange th=
at
> an interface can extend and implement an interface but a class can
> only implement interfaces. Also it is a bit weired that i can implement=

> multiple interface but extend only one.

An interface should not implement an interface, only classes should=20
implement interfaces.  'implement' infers that actual executable code is =

provided that implements an interface.  Again, I haven't followed the=20
interface stuff, and sorry for writting without reading the background,=20
but I'm working off the assumption that interfaces are kind of like IDL.

ok:
interface extends interface
class extends class implements interface

not ok:
interfaces implements interface
class extends interface

Shane