ID:               39403
 Updated by:       [EMAIL PROTECTED]
 Reported By:      baldurien at bbnwn dot eu
-Status:           Open
+Status:           Bogus
 Bug Type:         Feature/Change Request
 Operating System: Irrelevant
 PHP Version:      5.2.0
 New Comment:

That's right, you can't implement an interface twice, that just doesn't
make any sense.


Previous Comments:
------------------------------------------------------------------------

[2006-11-06 16:48:20] baldurien at bbnwn dot eu

Description:
------------
Hi,

Since php5.2, all my classes have error due to something that changed
in php5.2 : 

Fatal error: Class XtfLexer cannot implement previously implemented
interface XtfParserRegistrable 

The reason of that ?

Well take a look at the classes (the code does not interest you as it's
not the problem)

interface XtfParserRegistrable {}
interface XtfHeaderHandler extends XtfParserRegistrable {}
class XtfLexer implements XtfHeaderHandler, XtfParserRegistrable {}

Because the interface extends XtfParserRegistrable, the XtfLexer can
not implements XtfParserRegistrable itself.

This is STUPID, REALLY STUPID.

What happens if one day I change the interface/classes I
implements/extends, and if I still wish to benefit from one interface
that is *possibly* implemented by my parents interfaces/classes?

Well : it will fails.

Reproduce code:
---------------
Try this :

interface XtfParserRegistrable {}
interface XtfHeaderHandler extends XtfParserRegistrable {}
class XtfLexer implements XtfHeaderHandler, XtfParserRegistrable {}


Expected result:
----------------
We can implements interface implemented by parent class/interface, and
no (fatal) error should be thrown.

Actual result:
--------------
We can't.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=39403&edit=1

Reply via email to