From: pguilbault at iweb dot ca Operating system: PHP version: 5.0.3 PHP Bug Type: Session related Bug description: _SESSION treated as super global without session_start()
Description: ------------ Without using session_start() and setting $_SESSION['test']='hi there'; in a class and echoing thise $_SESSION['test'] outside the class with echo the 'hi there'... I was told it was a bug... Althougth I am hoping it is NOT a bug and that I will be able to use that super global for my Session Management class. So I can use $_SESSION['test'] in my classes instead of $GLOBAS['session_vars']['test']. which is way too long for my test. Reproduce code: --------------- class tester() { function __construct() { $_SESSION['test'] = 'hi there'; } } $test = new tester(); echo $_SESSION['test']; Expected result: ---------------- hi there -- Edit bug report at http://bugs.php.net/?id=32279&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32279&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32279&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32279&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32279&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32279&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32279&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32279&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32279&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32279&r=support Expected behavior: http://bugs.php.net/fix.php?id=32279&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32279&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32279&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32279&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32279&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32279&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32279&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32279&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32279&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32279&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32279&r=mysqlcfg