Are $_* always global
| From: | Martin Marques | Date: | Mon, 22 Sep 2003 14:42:40 +0000 |
| Subject: | Are $_* always global | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-7970@lists.php.net to get a copy of this message | ||
If I have a function and want to access data in $_SESSION or $_GET, do I have
to pass it as an argument or make it global?
I thought I had to, but just tried with a small example, doing a
var_dump($_SERVER) inside a function without defineing it as GROBAL and it
have me the information of the $_SERVER array.
How is this?
--
11:40:02 up 31 days, 3:30, 1 user, load average: 2.18, 1.59, 1.28
-----------------------------------------------------------------
Martín Marqués | mmarques@unl.edu.ar
Programador, Administrador, DBA | Centro de Telematica
Universidad Nacional
del Litoral
-----------------------------------------------------------------