From: winterain at gmail dot com Operating system: PHP version: 4.4.2 PHP Bug Type: Session related Bug description: variable scoping? session?
Description: ------------ hello... i'm having problem here... example, i got 2 files... 1st file contains (test.php) <?php session_start(); $_SESSION['xxx']="hello"; $xxx="world"; echo $xxx; echo "<br>".$_SESSION['xxx']; ?> then the 2nd file (test2.php) <?php session_start(); $xxx="world"; echo $xxx; echo "<br>".$_SESSION['xxx']; ?> if i'm goin to use PHP 4 for those files (say access test.php 1st, then next test2.php)... test.php would output "world hello"... and test2.php would output "world hello"... the problem rises when i used PHP 5... 1st file would output "world hello" but the 2nd file's output is "world world"... apparently, the $_SESSION['xxx'] value changed whenever $xxx value changes... is this some kind of bug under variable scoping? -- Edit bug report at http://bugs.php.net/?id=37426&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37426&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37426&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37426&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37426&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37426&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37426&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=37426&r=needscript Try newer version: http://bugs.php.net/fix.php?id=37426&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37426&r=support Expected behavior: http://bugs.php.net/fix.php?id=37426&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37426&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37426&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37426&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37426&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37426&r=dst IIS Stability: http://bugs.php.net/fix.php?id=37426&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37426&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37426&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37426&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=37426&r=mysqlcfg
