Bug #67270 [Ver->Dup]: Interface inferitance conflicting parent method
| From: | cmb@php.net | Date: | Wed, 30 Jun 2021 14:27:20 +0000 |
| Subject: | Bug #67270 [Ver->Dup]: Interface inferitance conflicting parent method | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-234703@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67270&edit=1
ID: 67270
Updated by: cmb@php.net
Reported by: eugen dot alter at gmail dot com
Summary: Interface inferitance conflicting parent method
-Status: Verified
+Status: Duplicate
Type: Bug
Package: Scripting Engine problem
Operating System: Any
PHP Version: 5.5.12
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
I'm closing this as duplicate of bug #76361.
Previous Comments:
------------------------------------------------------------------------
[2018-05-23 12:43:40] cmb@php.net
Related To: Bug #76361
------------------------------------------------------------------------
[2018-05-23 12:40:17] cmb@php.net
Confirmed: <https://3v4l.org/LRoYH> vs. <https://3v4l.org/EZiqk>.
------------------------------------------------------------------------
[2014-05-13 19:57:28] eugen dot alter at gmail dot com
Description:
------------
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.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67270&edit=1