note 30489 deleted from ref.session by betz
| From: | betz@php.net | Date: | Mon, 25 Jul 2005 07:25:13 +0000 |
| Subject: | note 30489 deleted from ref.session by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-92396@lists.php.net to get a copy of this message | ||
Note Submitter: quinn at strangecode dot com
----
Do not 'global' a superglobal! If you register a $_SUPERGLOBAL as a global variable (as
in... global $_SESSION; within a function definition) strange things happen with some versions of
PHP (PHP 4.2.3 on my MacOS X powerbook, but not my PHP 4.2.3 RH 7.3 linux machine). In the case I
found, $_SESSION and $HTTP_SESSION_VARS would not reference the same data, and unsetting or
accessing the data was inconsistant. Didn't test very far, but obviously this should not be
done, and it did wreck havoc for me.