|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-03-12 14:43 UTC] sniper@php.net
[2005-03-12 19:23 UTC] tony2001@php.net
[2005-03-13 00:44 UTC] pollita@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 20:00:01 2025 UTC |
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