Re: REVIEW: Imminent session patch

From: Date: Wed, 02 Oct 2002 21:07:00 +0000
Subject: Re: REVIEW: Imminent session patch
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-88896@lists.php.net to get a copy of this message
> On Wed, 2 Oct 2002, Rasmus Lerdorf wrote: > > > I really don't see why would want to deprecate session_register(). > > Regardless of whether register_globals is on or off, code like this works > > fine: > > > > Set a session var: > > session_register('a'); > > $a=1; > > > > Get a session var: > > session_start(); > > $a = $_SESSION['a']; > > Uh, how ugly. This has never been supported intentionally. > Looks like a result of multiple people modifying code and not > talking to each other. > > Note that the docs for session_register are out of date. It > is supposed to mean "register a slot in the session domain". > The global variable scope is only included in that domain, if > register_globals is enabled. But that is a bit of a twist of what "register_globals" is supposed to mean. As far as I am concerned register_globals only affects how data is imported into PHP. Having that flag trigger other behaviours is completely undocumented and outside the scope of the original intent of register_globals. You are effectively overloading register_globals. -Rasmus

« previous php.dev (#88896) next »