ID: 32279 Updated by: [EMAIL PROTECTED] Reported By: pguilbault at iweb dot ca Status: Open Bug Type: Session related PHP Version: 5.0.3 New Comment:
Well, personally I don't think it's a bug. Other autoglobals are registered in the same time too (i.e. at module init time). Previous Comments: ------------------------------------------------------------------------ [2005-03-12 14:43:42] [EMAIL PROTECTED] Yes, it's definately a bug. And I wouldn't suggest using $_SESSION like that as we might a) fix this bug b) this won't work if session extension is not enabled.. ------------------------------------------------------------------------ [2005-03-11 15:54:38] pguilbault at iweb dot ca 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 this bug report at http://bugs.php.net/?id=32279&edit=1