From: jason at hybd dot net Operating system: Irrelevent PHP version: 5.0.4 PHP Bug Type: Scripting Engine problem Bug description: Conflicts with multiple interfaces sharing common method names
Description: ------------ This is debateable if this is a bug or not. Personally, I don't regard it as a bug. Classes that implement >1 interface that share common methods raise fatal errors. Because of the abstract nature of interfaces, no error or warning should be rasied. I know PHP <> Java, but Java doesn't raise any errors, and PHP5's OO model is very close to Java's Reproduce code: --------------- interface FirstInterface { function execute(); } interface SecondInterface { function execute(); } class MyClass implements FirstInterface, SecondInterface { function execute() { echo "Hello World"; } } $obj = new MyClass(); $obj->execute(); Expected result: ---------------- Hello World Actual result: -------------- Can't inherit abstract function SecondInterface::execute() -- Edit bug report at http://bugs.php.net/?id=33698&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33698&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33698&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33698&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33698&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33698&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33698&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33698&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33698&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33698&r=support Expected behavior: http://bugs.php.net/fix.php?id=33698&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33698&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33698&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33698&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33698&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33698&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33698&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33698&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33698&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33698&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33698&r=mysqlcfg