note 24484 deleted from language.variables by torben
| From: | torben@php.net | Date: | Wed, 18 Jun 2003 19:19:12 +0000 |
| Subject: | note 24484 deleted from language.variables by torben | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-50596@lists.php.net to get a copy of this message | ||
Note Submitter: r.yaker@wiredfusion.net
----
If you use global variables within a function, take note that changing the variable keyword from
"global", somewhere down the line, to "return", that that variable can either be
one or the other. It can't be both "returned" and "global".
So, if within a function you have on line x:
global $var;
and then on line x+1:
return $var;
that $var becomes no longer global, and instead just and only "returned".