#35057 [NEW]: abstract method inheritance and interface implementation problem
| From: | antonsub at pochtamt dot ru | Date: | Tue, 01 Nov 2005 20:12:42 +0000 |
| Subject: | #35057 [NEW]: abstract method inheritance and interface implementation problem | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-87360@lists.php.net to get a copy of this message | ||
From: antonsub at pochtamt dot ru
Operating system: Linux
PHP version: 5.1.0RC4
PHP Bug Type: Scripting Engine problem
Bug description: abstract method inheritance and interface implementation problem
Description:
------------
Code given produces fatal error:
Can't inherit abstract function A::foo() (previously declared abstract in
B) in foo.php on line 20
Reproduce code:
---------------
<?php
interface A
{
public function foo($id);
}
abstract class B
{
abstract public function foo($id);
}
class C extends B
{
public function foo($id)
{
echo "foo\n";
}
}
class D extends C implements A {}
var_dump(new D);
?>
Expected result:
----------------
But is expected to run cleanly.
--
Edit bug report at http://bugs.php.net/?id=35057&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35057&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35057&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35057&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35057&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35057&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35057&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35057&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35057&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35057&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35057&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35057&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35057&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35057&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35057&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35057&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35057&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35057&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35057&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35057&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35057&r=mysqlcfg