Req #28835 [Opn->Csd]: cannot call overloaded methods via parent::method() or self::method()
| From: | requinix@php.net | Date: | Sat, 01 Nov 2014 22:48:01 +0000 |
| Subject: | Req #28835 [Opn->Csd]: cannot call overloaded methods via parent::method() or self::method() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-188406@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=28835&edit=1
ID: 28835
Updated by: requinix@php.net
Reported by: david dot seidel at one-jinx dot de
Summary: cannot call overloaded methods via parent::method()
or self::method()
-Status: Open
+Status: Closed
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: *General Issues
Operating System: SuSE Linux 2.4.19-4GB
PHP Version: 5.0.0RC3
-Assigned To:
+Assigned To: requinix
Block user comment: N
Private report: N
New Comment:
Duplicated as bug #42937 which was fixed in 5.2.6.
http://3v4l.org/HPRX0
Previous Comments:
------------------------------------------------------------------------
[2004-06-18 18:44:57] david dot seidel at one-jinx dot de
Description:
------------
I would like to call overloaded methods via the magic function __call($methodName, $params), but
this fail in context with parent or self.
Reproduce code:
---------------
<?PHP
class Test {
public function __call($methodName, $args) {
print "Hello World";
}
}
class Test2 extends Test {
public function testMe() {
parent::setName();
}
}
$test = new Test2();
$test->testMe();
?>
Expected result:
----------------
ouput: Hello World
Actual result:
--------------
Fatal error: Call to undefined method Test::testmealso() in
/srv/www/htdocs/bluewonder_neo/bluewonder/tests/david_test.php on line 4
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=28835&edit=1