|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-11-17 19:08 UTC] someone dot wanted dot to dot be dot unknown at gmail dot com
[2016-04-16 13:41 UTC] nikic@php.net
-Status: Open
+Status: Duplicate
[2016-04-16 13:41 UTC] nikic@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 11:00:01 2025 UTC |
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 ...