|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-09-07 20:05 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 18:00:01 2025 UTC |
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