Bug #67270 [NEW]: Interface inferitance conflicting parent method

From: Date: Tue, 13 May 2014 19:57:28 +0000
Subject: Bug #67270 [NEW]: Interface inferitance conflicting parent method
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-185809@lists.php.net to get a copy of this message
From:             eugen dot alter at gmail dot com
Operating system: Any
PHP version:      5.5.12
Package:          *General Issues
Bug Type:         Bug
Bug description:Interface inferitance conflicting parent method

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 bug report at https://bugs.php.net/bug.php?id=67270&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=67270&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=67270&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=67270&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=67270&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=67270&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=67270&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=67270&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=67270&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=67270&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=67270&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=67270&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=67270&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=67270&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=67270&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=67270&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=67270&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=67270&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=67270&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=67270&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=67270&r=mysqlcfg



Thread (3 messages)

« previous php.bugs (#185809) next »