Re: Global Variables -- why not have them?
| From: | John Meyer | Date: | Sat, 07 Jul 2001 20:00:31 +0000 |
| Subject: | Re: Global Variables -- why not have them? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-56660@lists.php.net to get a copy of this message | ||
At 02:55 PM 7/7/01 -0400, Mitch Vincent wrote:
I don't know what the makers of PHP had in mind, but from my experience, having truly global variables is a very bad idea. In fact, you should be trying to limit your need of global variables, so that your program can count on the integrity of the variables. John Meyer john_meyer@geocities.com Programmer If we didn't have Microsoft, we'd have to blame ourselves for all of our programs crashingI've been using PHP for several years now and one question has plaguedme the entire time. Why doesn't PHP have global variables? Before someone says it, I do know PHP sort of does have global variables, but having to specify GLOBAL in any function I want to see that variable in disqualifies it from being a truly global variable IMHO..I suppose I'm more curious than anything else.. Thanks!-Mitch