From:
Operating system: WINDOWS
PHP version: 5.3SVN-2010-05-14 (SVN)
Package: Class/Object related
Bug Type: Bug
Bug description:maybe a wrong oop logic.
Description:
------------
A fatal error generates when a class extends from an abstract class and
implements
from an interface both with a same named abstract (all methods defined
inside
interfaces are abstract) method inside.
Test script:
---------------
<?php
abstract class TAbstractParam {
public abstract function getType(); //getType
}
interface IParam {
public function getType(); //getType again.
}
class TPrimativeParam extends TAbstractParam implements IParam {
public function getType() {return 'VARCHAR'; } //another getType, the
fatal error goes here.
}
Expected result:
----------------
[just nothing...]
Actual result:
--------------
Fatal error: Can't inherit abstract function IParam::getType() (previously
declared abstract in TAbstractParam) in E:\foo.php on line 10
--
Edit bug report at http://bugs.php.net/bug.php?id=51826&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51826&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51826&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=51826&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=51826&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=51826&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51826&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=51826&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=51826&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=51826&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=51826&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=51826&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=51826&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=51826&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51826&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51826&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51826&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=51826&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=51826&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=51826&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=51826&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=51826&r=mysqlcfg