|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-01-28 23:33 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 17 08:00:01 2025 UTC |
Description: ------------ Sory. I very bad speek english. ???????? ????????????? ????????? __CLASS__. Reproduce code: --------------- class Test1 { public function __construct() { } public function foo() { echo __CLASS__ . '<br />'; } } class Test2 extends Test1 { public function __construct() { } } $obj1 = new Test1(); $obj2 = new Test2(); $obj1->foo(); $obj2->foo(); Expected result: ---------------- Test1<br /> Test1<br /> Actual result: -------------- I think, that result must be: Test1<br /> Test2<br /> ????? Test2() ????????? ?????? ?????? Test1() ? ????? foo() ??? ?????? ?? ??????? obj2 ?????? ???? ?????? ??? ????? ?????? Test2() IMHO