#25302 [NEW]: referancing object members is GLOBALS does not work properly

From: Date: Thu, 28 Aug 2003 20:05:38 +0000
Subject: #25302 [NEW]: referancing object members is GLOBALS does not work properly
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-46878@lists.php.net to get a copy of this message
From: rani_s_m2001 at yahoo dot com Operating system: windows xp PHP version: 4.3.2 PHP Bug Type: Class/Object related Bug description: referancing object members is GLOBALS does not work properly Description: ------------ when creating an object on the globals array, referancing its members to a variable does not work properly. it works as expected in normal arrays. Reproduce code: --------------- <?php class a { var $r; function a() { $this->r=1; } } $GLOBALS["a"]=&new a(); $a=&$GLOBALS["a"]->r; print($a); $GLOBALS["a"]->r=2; //should print 2, instead prints 1 print($a); ?> Expected result: ---------------- 12 Actual result: -------------- 11 -- Edit bug report at http://bugs.php.net/?id=25302&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25302&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25302&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25302&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25302&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25302&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25302&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25302&r=support Expected behavior: http://bugs.php.net/fix.php?id=25302&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25302&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25302&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25302&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25302&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25302&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25302&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25302&r=gnused

« previous php.bugs (#46878) next »