#34494 [Opn->Bgs]: overloading function in child class doesn't work
| From: | sniper@php.net | Date: | Tue, 13 Sep 2005 21:14:52 +0000 |
| Subject: | #34494 [Opn->Bgs]: overloading function in child class doesn't work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-85001@lists.php.net to get a copy of this message | ||
ID: 34494
Updated by: sniper@php.net
Reported By: esad dot public at esse dot at
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Linux 2.6.11
PHP Version: 5.0.5
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Previous Comments:
------------------------------------------------------------------------
[2005-09-13 21:52:09] esad dot public at esse dot at
Description:
------------
When I try to overload the function in parent class by just assigning
the function argument a default value, the interpreter complains (when
running in strict mode)
Reproduce code:
---------------
class Node {
public function process($param) {
}
}
class Node_FrontController extends Node {
public function process($param=null) {
}
}
Expected result:
----------------
No warning message
Actual result:
--------------
Strict Standards: Declaration of Node_FrontController::process() should
be compatible with that of Node::process() in FrontController.inc.php on
line 25
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34494&edit=1