> > Well, you still need to resolve precedence for $_REQUEST somehow.
> >
>
> I forgot about $_REQUEST :)
>
> How about this one?
>
> - Store EGPCS to $_* hash and initialize them always.

That can get expensive since 'E' can be rather large and is usually full
of useless stuff.  Perhaps always populating GPCS is a good choice here.
'E' can always be fetched individually via getenv() anyway.  Since there
no equivalent getpost() function it is a good idea to not toss this data.

> - Create "global_order" ini entry to determine $GLOBAL
>    precedence.
> - Create "request_order" ini to entry determine $_REQUEST
>    precedence.
> - Get rid of "variable_order" and "gpc_order". If user
>    uses them, warn about it(?).

Why not just leave variables_order alone and not affect BC.  If GPCS is
always populated then this issue is solved.  With register_globals on and
variables_order set to "S" you would still get server vars in the global
symbol table, be able to use import_request_variables() to import request
vars into the global symbol table (and probably rename them along the
way) and access $_GET, $_POST, etc... directly.

> This change is acceptable for 4.2.0, IMHO.
> (Many lines are needed to be changed, but we are going
> to set "register_global=Off" as a default, right?)

Correct.  Which is why I am looking at real-world uses here.  Despite the
shorter symbol names, it is still a hassle writing echo $_GET['var'] all
the time.  And there is no decent reason not to import Server variables
into the global namespace.

To me a good setup would be:

register_globals = On
variables_order = "S"
always_populate_gpcs   (not a directive)

<?php
    import_request_variables('GP', 'r_');
    echo $HTTP_USER_AGENT;
    echo $r_var;
?>

To me that script is cleaner and nicer than:

<?php
    echo $_SERVER['HTTP_USER_AGENT'];
    echo $_REQUEST['var'];
?>

-Rasmus


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to