#43884 [Opn->Bgs]: Object model
| From: | tony2001@php.net | Date: | Mon, 28 Jan 2008 23:33:09 +0000 |
| Subject: | #43884 [Opn->Bgs]: Object model | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-121634@lists.php.net to get a copy of this message | ||
ID: 43884
Updated by: tony2001@php.net
Reported By: vbaryshev at list dot ru
-Status: Open
+Status: Bogus
Bug Type: *General Issues
Operating System: Windows XP
PHP Version: 6CVS-2008-01-17 (snap)
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Constants like __FILE__, __LINE__, __CLASS__ and alike ar resolved in
compile time.
Please read the docs before reporting.
Previous Comments:
------------------------------------------------------------------------
[2008-01-17 21:16:17] vbaryshev at list dot ru
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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43884&edit=1