Re: Global Variables -- why not have them?

From: Date: Sat, 07 Jul 2001 19:05:06 +0000
Subject: Re: Global Variables -- why not have them?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-56661@lists.php.net to get a copy of this message
I appreciate the reply, thanks.. However, I think you missed my question. My question is a why, not a how question.. It's a language feature I've come to count on with the other languages I work with (C, mainly), and I'm wondering what prompted the decision to move towards having to specify global variables (and essentially eliminating global variables). I don't want anyone to take this as a flame of PHP -- it's by far the language that I do most of my work in, it's a great language and I love it. None of that changes my curiosity about the global variable question :-) On an off-topic note, I very much dislike Perl -- I'm more of a Ruby kind of person *grin*.. Again, thanks... -Mitch > there are two sets of variables. global and local. you have to assume one > and specify the other. > > in perl, global is assumed and you have to specify local. > > in php, local is assumed and you have to specify global. > > maybe you should be programming in perl.

« previous php.general (#56661) next »