Bug #68438 [NEW]: Can not inherit abstract function to extend its syntax
| From: | someone dot wanted dot to dot be dot unknown at gmail dot com | Date: | Mon, 17 Nov 2014 19:06:52 +0000 |
| Subject: | Bug #68438 [NEW]: Can not inherit abstract function to extend its syntax | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-188644@lists.php.net to get a copy of this message | ||
From: someone dot wanted dot to dot be dot unknown at gmail dot com
Operating system: Linux
PHP version: Irrelevant
Package: Reproducible crash
Bug Type: Bug
Bug description:Can not inherit abstract function to extend its syntax
Description:
------------
My code class A, that defined abstract method
method with one
argument.
After that class B extends A. In this place I can not extend signature
of method (for example, add new required arguments).
Code is following.
That's strange and non-intuitive behavior.
This bug is appearing on PHP 5.0.0 - 5.6.3.
Test script:
---------------
abstract class A {
abstract function method($a);
}
abstract class B extends A {
abstract function method($a, $b);
}
Expected result:
----------------
none printable result
Actual result:
--------------
Fatal error: Can't inherit abstract function A::method() (previously
declared abstract in B) in ...
--
Edit bug report at https://bugs.php.net/bug.php?id=68438&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68438&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68438&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68438&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68438&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68438&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68438&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68438&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68438&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68438&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68438&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68438&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68438&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68438&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68438&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68438&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68438&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68438&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68438&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68438&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68438&r=mysqlcfg