#38497 [Bgs->Opn]: Overloading does not work with extended classes (__call() never called)
| From: | alessio dot bazzica at gmail dot com | Date: | Fri, 15 Sep 2006 09:30:27 +0000 |
| Subject: | #38497 [Bgs->Opn]: Overloading does not work with extended classes (__call() never called) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-102268@lists.php.net to get a copy of this message | ||
ID: 38497
User updated by: alessio dot bazzica at gmail dot com
Reported By: alessio dot bazzica at gmail dot com
-Status: Bogus
+Status: Open
Bug Type: Feature/Change Request
Operating System: Mac OS X
PHP Version: 5.1.5
New Comment:
Sorry, maybe I didn't explain the problem clearly. Sure
child classes inherit parent's methods but my problem is
another. I need to overload ParentClass::DoSomething() so I
defined ChildClass::__call($method, $args) to call
ChildClass::DoSomething_OVERLOAD() instead of
ChildClass::DoSomething() (if $method is 'DoSomething'). It
seems that PHP invoke DoSomething() before __call() on child
class. In this case it is ALWAYS impossible to overload a
parent method. My question is: "PHP denies parent method
overloading or this could be a bug???". Thank you, Alessio
Previous Comments:
------------------------------------------------------------------------
[2006-09-14 20:52:05] tony2001@php.net
Childs DO inherit parent's methods.
No bug here, this is expected and well documented.
------------------------------------------------------------------------
[2006-09-14 20:31:49] alessio dot bazzica at gmail dot com
Please download a zip file containing my test case script at
http://webapp.altervista.org/php_ovrldext_test.zip.
Recently I
tried to run the script on other enviroments and there is the
same problem. Thank you, Alessio
------------------------------------------------------------------------
[2006-08-29 01:00:00] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2006-08-21 08:23:56] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2006-08-18 11:25:35] alessio dot bazzica at gmail dot com
Link does not work; cut and paste URL to download zip file containing
test.php (http://webapp.altervista.org/php_ovrldext_test.zip).
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/38497
--
Edit this bug report at http://bugs.php.net/?id=38497&edit=1