note 23606 added to ref.session

From: Date: Tue, 23 Jul 2002 16:19:11 +0000
Subject: note 23606 added to ref.session
Groups: php.notes 
Request: Send a blank email to php-notes+get-33433@lists.php.net to get a copy of this message
I don't know if this has been clarified, discussed at all, or is configurable, but all of the $_variables appear to be omni-present. I know this is true for $_SESSION. What this means is that you don't need to use the global clause inside a function...: function MyFunction() { // //** global $_SESSION; **// here is not needed $_SESSION['someting']++; // this seems to work. } in fact I originally tried to use global on $_SESSION and had problems (not sure if it was explicitly this!!!). Hope this info will be clarified in the manual for all system vars ($_POST, $_GET, $_SERVER, $_SESSION, etc...). --Doug -- http://www.php.net/manual/en/ref.session.php http://master.php.net/manage/user-notes.php?action=edit+23606 http://master.php.net/manage/user-notes.php?action=delete+23606 http://master.php.net/manage/user-notes.php?action=reject+23606

« previous php.notes (#33433) next »