> 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


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to