[Phpmyadmin-devel] Removing of grab_globals
Sebastian Mendel
lists at sebastianmendel.de
Wed Dec 7 10:49:06 CET 2005
Marc Delisle schrieb:
> Sebastian Mendel a écrit :
>
>> Marc Delisle schrieb:
>>
>>>> i think in most cases PMA should use $_REQUEST directly and use one
>>>> of the above function only to set default values
>>>>
>>>> using of $_REQUEST makes it more clear where this variable came
>>>> from, reminding the developer always to take care with this variables!
>>>
>>>
>>> I don't understand why using $_REQUEST makes more clear where this
>>> variable came from. In $_REQUEST, variables can come from EGPCS, as
>>> defined by the variables_order directive. I think that it's better to
>>> say explicitly where we expect each variable to come from.
>>
>>
>> $_REQUEST holds only $_POST, $_GET, $_COOKIE, normally in this order
>
>
> Not according to
> http://www.php.net/manual/en/ini.core.php#ini.variables-order
this is the order for register_globals what has not much todo with $_REQUEST
http://de.php.net/manual/en/reserved.variables.php#reserved.variables.request
>> and it makes clear that this variable came from outside and has to be
>> handled with care, of course the other superglobals too
>
> So why not go with the clearer way?
why not? i did not fully understand ...
what is the clearer way?
i prefer using $_REQUEST as the clearer way as i wrote before
i always prefer using superglobals than importing them into GLOBAL space
and i prefer use $_REQUEST than $_POST or $_GET as sometimes its needed
to change between POSTING or 'GETTING' variables, like PMA currently
does with request larger than 1000 chars.
More information about the Developers
mailing list