Re: global HTTP_(POST|GET|SESSION|SERVER|COOKIE)_VARS;
| From: | derick@php.net | Date: | Mon, 02 Jul 2001 13:25:17 +0000 |
| Subject: | Re: global HTTP_(POST|GET|SESSION|SERVER|COOKIE)_VARS; | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-58691@lists.php.net to get a copy of this message | ||
On Mon, 2 Jul 2001, Zeev Suraski wrote:
> (a) I agree that the names are long
> (b) Remember that you can change the name by simply assigning it around
> (e.g., $GET_A = $HTTP_GET_VARS)
I know this, but then you'll end up with:
$GET_A = $GLOBALS["HTTP_GET_VARS"];
$POST_A = $GLOBALS["HTTP_POST_VARS"];
...
and this is what I don't like in every function :)
> (c) I think that $GET_A is ugly :) I'd go for something along the lines of
> $__GET
I agree with that, $GET_A was just a proposal.
> (d) Having these variables available on every function means that it's
> going to slow things down, so it's a no-no. What we can do is do something
> along the lines of $GLOBALS - where it is available in every function that
> *uses* it. The drawback here is that it means it will not be available via
> indirect reference (i.e., $foo = "__GET", $$foo["bar"]). I don't
> think
> it's a serious drawback though.
I think this would be excellent. I don't see any reason why I would
even want to use $foo = "__GET";
regards,
Derick Rethans
---------------------------------------------------------------------
PHP: Scripting the Web - www.php.net - derick@php.net
SRM: Site Resource Manager - www.vl-srm.net
---------------------------------------------------------------------