From:             wrzasq at gmail dot com
Operating system: Debian GNU/Linux
PHP version:      5.2.6
PHP Bug Type:     Scripting Engine problem
Bug description:  Impossible to implement compatible interfaces

Description:
------------
It is impossible to implement multiple interfaces that declares same 
methods. I saw bug #43200 but this is a bit different case and I 
think in this situation it shoud be allowed - those interfaces 
requires methods with same signature (also to prevent further 
problems - optional parameters should also be allowed to match 
signatures):

Reproduce code:
---------------
<?php
interface A
{
public function foo();
}

interface B
{
public function foo();
}

class C implements A, B
{
public function foo(){}
}


Expected result:
----------------
nothing, but working

Actual result:
--------------
Fatal error: Can't inherit abstract function B::foo() (previously 
declared abstract in A) in /home/wrzasq/Desktop/Www/engine/- on line 
16

-- 
Edit bug report at http://bugs.php.net/?id=46705&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=46705&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=46705&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=46705&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=46705&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=46705&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=46705&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=46705&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=46705&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=46705&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=46705&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=46705&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=46705&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=46705&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=46705&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=46705&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=46705&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=46705&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=46705&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=46705&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=46705&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=46705&r=mysqlcfg

Reply via email to