|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67270 Interface inferitance conflicting parent method
Submitted: 2014-05-13 19:57 UTC Modified: 2018-05-23 12:40 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: eugen dot alter at gmail dot com Assigned:
Status: Verified Package: Scripting Engine problem
PHP Version: 5.5.12 OS: Any
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-05-13 19:57 UTC] eugen dot alter at gmail dot com
PHP does not restrict extension of two interfaces that have conflicting methods if extension is made right-to-left.

Test script:
interface Foo
   public function test(array $x, $y=0);

interface Bar
   public function test(array $x, $y);

interface Baz extends Foo, Bar {}

//however, this will fail with expected fatal error:
//interface Baz extends Bar, Foo {}

Expected result:
Fatal error: Declaration of Bar::test() must be compatible with

Actual result:
All goes well. No error happened.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-05-23 12:40 UTC]
-Status: Open +Status: Verified -Package: *General Issues +Package: Scripting Engine problem
 [2018-05-23 12:40 UTC]
Confirmed: <> vs. <>.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu May 06 20:01:24 2021 UTC