Re: Scope of variables, headers and constants
| From: | Richard Lynch | Date: | Sun, 17 Dec 2000 06:41:34 +0000 |
| Subject: | Re: Scope of variables, headers and constants | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30717@lists.php.net to get a copy of this message | ||
Constants are global.
----- Original Message -----
From: "Carsten Gehling" <carsten@sarum.dk>
Newsgroups: php.general
Sent: Saturday, December 16, 2000 5:20 PM
Subject: [PHP] Scope of variables, headers and constants
> While debugging one of my PHP-scripts, it suddenly dawned upon me that the
> variable-scope rules also apply for the header-variables, i.e.
> $HTTP_POST_VARS and $HTTP_GET_VARS. I thoght they were automatically
global
> inside a function.
>
> Does the same apply for constants declared with the function define() ?
>
> - Carsten
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>