Globalness of variables? Functions & subs
| From: | Dexter | Date: | Wed, 25 Apr 2001 01:11:54 +0000 |
| Subject: | Globalness of variables? Functions & subs | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-50198@lists.php.net to get a copy of this message | ||
Hi PHPers,
I noticed that you have to use keyword "global" in front of globla var.- (one declared at
the top of a script outside any functions ) in order to access it inside a function. So merely
designating a var. global is a little more involved than say Perl or other languages. You actually
have to tell PHP that the function is global.
I see functions , are there subroutine calls. I guess not. A function acts as a sub when it
returns no value . A sub that returns a value is a function.
Thanks
Dexter