Re: env vars in included _functions_?
| From: | Matthew Leingang | Date: | Thu, 30 Nov 2000 18:44:10 +0000 |
| Subject: | Re: env vars in included _functions_? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-28096@lists.php.net to get a copy of this message | ||
On Thu, 30 Nov 2000, Sean Straw / PSE wrote:
> I'd have thought that environment-defined variables would have been
> considered global to start with.
They _are_ global, but PHP handles globals a little differently from some
other languages. No global variable is inherited within a smaller scope
unless you declare it so. So it's not just environment variables, but all
variables that need to be declared global within the functions you want to
use them.
--Matt
----------------------------------------------------------------
Matthew Leingang http://www.math.rutgers.edu/
Rutgers University leingang@math.rutgers.edu
Department of Mathematics "This signature needs no quote."
k