|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-10-11 21:26 UTC] tony2001@php.net
[2005-10-11 22:39 UTC] stochnagara at hotmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 21:00:02 2025 UTC |
Description: ------------ $this is assigned incorrectly. See the sample code below. Reproduce code: --------------- <? class abc { function a() { echo "abc::a\n"; $this->b(); } function b() { echo "abc::b\n"; } } class def { function c() { echo "def::c\n"; abc::a(); } } $test = new def(); $test->c(); Expected result: ---------------- def::c abc::a some error message Actual result: -------------- def::c abc::a Fatal error: Call to undefined method def::b() in ...php on line 4