Bug #68438 [Com]: Can not inherit abstract function to extend its syntax

From: Date: Mon, 17 Nov 2014 19:08:28 +0000
Subject: Bug #68438 [Com]: Can not inherit abstract function to extend its syntax
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-188645@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68438&edit=1 ID: 68438 Comment by: someone dot wanted dot to dot be dot unknown at gmail dot com Reported by: someone dot wanted dot to dot be dot unknown at gmail dot com Summary: Can not inherit abstract function to extend its syntax Status: Open Type: Bug Package: Reproducible crash Operating System: Linux PHP Version: Irrelevant Block user comment: N Private report: N New Comment: I saw previously reported bugs, but this is NOT about inheriting method in interfaces, but in classes. It is not fix for now. http://3v4l.org/rj5AF Previous Comments: ------------------------------------------------------------------------ [2014-11-17 19:06:52] someone dot wanted dot to dot be dot unknown at gmail dot com 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 this bug report at https://bugs.php.net/bug.php?id=68438&edit=1

« previous php.bugs (#188645) next »