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
 [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: Fri Mar 29 05:01:28 2024 UTC