NYCPHP Meetup

NYPHP.org

[nycphp-talk] $_SESSION, session_unset(), unset($_SESSION['var']), register_globals and the PHP Manual

Scott Mattocks crisscott at netzero.com
Fri Jul 23 14:52:27 EDT 2004


Phillip Powell wrote:

> Did this include PHP 4.3.6 as well?
> 
> I was told that you cannot change the value of an autoglobal in a 
> function or method with register_globals on and expect to retain that 
> change upon exit, you'd have to globalize the autoglobal before you exit.

That doesn't make any sense.  A global's scope is global.  If your 
changes don't affect the variable in the global scope then it isn't a 
really a global is it?  I have a hard time believing that in 4.3.6 a) 
$_SESSION is not a global and/or b) the value of register_globals has 
any effect on the way unset() works.

I don't think that the PHP version or the state of register_globals is 
your problem, but you could check the change log to see what has changed 
between the two versions.

Scott Mattocks



More information about the talk mailing list