|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-10-05 10:55 UTC] johannes@php.net
[2005-10-05 10:56 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
Description: ------------ a parent class has a __call a sub class inherit from the parent call parent::method whill cause undifined method error. Reproduce code: --------------- <?php class test { private $val; public function __call($m, $a) { echo "Method $m called:\n"; } } class test2 extends test { public function setX() { parent::setX(); } } $test2 = new test2(); $test2 -> setX('name'); ?> Expected result: ---------------- setX Actual result: -------------- undefined method