#33446 [NEW]: Referencing a variable makes everything a variable

From: Date: Thu, 23 Jun 2005 08:44:10 +0000
Subject: #33446 [NEW]: Referencing a variable makes everything a variable
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-80873@lists.php.net to get a copy of this message
From: bens at effortlessis dot com Operating system: WhiteBox Enterprise Linux 4 PHP version: 5.0.4 PHP Bug Type: Variables related Bug description: Referencing a variable makes everything a variable Description: ------------ a) When you define a simple variable, and then reference it with another variable, both variables become references... What does this reference? Why does the status of a previously defined variable change? b) No modules defined. (./configure; make; make install;) Stock install, stock php.ini. Reproduce code: --------------- <? $b=5; $a=&$b; var_dump(Get_Defined_Vars()); ?> Expected result: ---------------- ..... ["b"]=> int(5) ["a"]=> &int(5) } Actual result: -------------- .... ["b"]=> &int(5) ["a"]=> &int(5) } -- Edit bug report at http://bugs.php.net/?id=33446&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33446&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33446&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33446&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33446&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33446&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33446&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33446&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33446&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33446&r=support Expected behavior: http://bugs.php.net/fix.php?id=33446&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33446&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33446&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33446&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33446&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33446&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33446&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33446&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33446&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33446&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33446&r=mysqlcfg

« previous php.bugs (#80873) next »