#43884 [NEW]: Object model

From: Date: Thu, 17 Jan 2008 21:16:17 +0000
Subject: #43884 [NEW]: Object model
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-121377@lists.php.net to get a copy of this message
From: vbaryshev at list dot ru Operating system: Windows XP PHP version: 6CVS-2008-01-17 (snap) PHP Bug Type: *General Issues Bug description: Object model 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 bug report at http://bugs.php.net/?id=43884&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43884&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43884&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43884&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43884&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43884&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43884&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43884&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=43884&r=needscript Try newer version: http://bugs.php.net/fix.php?id=43884&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43884&r=support Expected behavior: http://bugs.php.net/fix.php?id=43884&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43884&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43884&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43884&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43884&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43884&r=dst IIS Stability: http://bugs.php.net/fix.php?id=43884&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43884&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43884&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43884&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=43884&r=mysqlcfg

« previous php.bugs (#121377) next »