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] (Andrei Zmievski) Wed, 12 Mar 2003 14:20:55 -0500
| Newsgroups | php.dev |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 12 Mar 2003, Marcus B=F6rger wrote:
> >interface JAZ {}
> >interface FOO {}
> >interface BAR extends FOO {}
> >class foo implements FOO {}
>=20
> This works even though i do not like extends FOO.
Why? Both C# and Java (AFAIR) allow interfaces to extend other
interfaces.
> This doesn't - i hope - trying -
>=20
> <?php
> interface a {}
> interface b {}
> class c implements (a,b) {}
> /usr/src/php4-HEAD/-(4) : Parse error - parse error, unexpected '(',=20
> expecting T_STRING or T_PAAMAYIM_NEKUDOTAYIM or T_NAMESPACE_NAME
>=20
> You have to do
>=20
> class foobar extends foo implements BAR,JAZ {}
I think we should disallow classes extending interfaces. Only
'implements' should be supported.
-Andrei http://www.gravitonic.com/
We all have photographic memories, it's just
that some of us don't have any film.