|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-11-01 22:48 UTC] requinix@php.net
-Status: Open
+Status: Closed
-Package: Feature/Change Request
+Package: *General Issues
-Assigned To:
+Assigned To: requinix
[2014-11-01 22:48 UTC] requinix@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 14:00:02 2025 UTC |
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