Re: Re: Question about superglobals
| From: | Robert Cummings | Date: | Sun, 18 Nov 2007 10:02:24 +0000 |
| Subject: | Re: Re: Question about superglobals | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-33242@lists.php.net to get a copy of this message | ||
On Sat, 2007-11-17 at 18:03 -0800, Stanislav Malyshev wrote:
> > You say that superglobals were not designed to be user defined, think
> > about it, the concept of a superglobal is present in C and C++, two of
> > the maturest and strictest languages around.
>
> Concept of inserting assembly code is in C and C++ too. That doesn't
> mean it's a good idea to add it to PHP. C and C++ are low-level
> languages that were designed for giving people "enough rope". PHP is not
> so.
I didn't notice Sam's above post abut C and C++ before. Unlike PHP, C
and C++ require you declare your variables. Any locally declared
variables have precedence over globally defined variables and so there's
only risk of confusion if you forget to declare your local variable.
This clearly puts usefulness of C/C++ globals and PHP globals in
different arenas.
Cheers,
Rob.
--
...........................................................
SwarmBuy.com - http://www.swarmbuy.com
Leveraging the buying power of the masses!
...........................................................