php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34521 Extending multiple interfaces with the same method fails
Submitted: 2005-09-16 04:23 UTC Modified: 2005-09-16 04:42 UTC
From: lachlan at sitepoint dot com Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 5.0.5 OS: Win32
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: lachlan at sitepoint dot com
New email:
PHP Version: OS:

 

 [2005-09-16 04:23 UTC] lachlan at sitepoint dot com
Description:
------------
When multiple interfaces with common method names are extended by an interface an error is raised.

Reproduce code:
---------------
interface a { function foo($bar); }
interface b { function foo($bar); }
interface ab extends a,b {}

Result:

Fatal error: Can't inherit abstract function b::foo() (previously declared abstract in a)

Expected result:
----------------
The code should parse cleanly


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-16 04:42 UTC] lachlan at sitepoint dot com
Due to the lack of overloading in the engine a fatal error is probably the desired behaviour for this scenario.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 04:01:33 2024 UTC