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.

> This makes perfect sense to me and I see no reason to change that way of
> writing session code.

    I've verified that this works in the 4.2 tree.  I'll update
    the patch to include a change to get_session_var.  Sigh.

    - Sascha


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

Reply via email to