Re: Re: Globals
| From: | Jim Lucas | Date: | Fri, 01 Aug 2003 20:10:38 +0000 |
| Subject: | Re: Re: Globals | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-158001@lists.php.net to get a copy of this message | ||
actually, it does work and it does exist.
Try using print_r() or
print_r(array_keys($GLOBALS));
and you will see an entry for GLOBALS
mine is located at #13
Jim Lucas
----- Original Message -----
From: "Greg Beaver" <greg@chiaraquartet.net>
To: "Leif K-Brooks" <eurleif@buyer-brokerage.com>
Cc: <php-general@lists.php.net>
Sent: Friday, August 01, 2003 12:45 PM
Subject: Re: [PHP] Re: Globals
> Try this code:
>
> <?php
> function blah() {
> var_dump($GLOBALS['GLOBALS']);
>
> }
>
> blah();
> ?>
>
> It appears that in a function scope, it doesn't. This is definitely a
> bug, I'll post it if it hasn't already been noticed.
>
> Greg
>
> Leif K-Brooks wrote:
>
> > Greg Beaver wrote:
> >
> >> $GLOBALS does not contain a reference to itself
> >
> >
> > Yes it does. I just ran the following, and I got "Greg is wrong."
> >
> > <?php
> > $foo = 'Greg is wrong.';
> > echo
> > $GLOBALS['GLOBALS']['GLOBALS']['GLOBALS']['foo'];
> > ?>
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>