Re: [PHP] $GLOBALS example script on php.net

2011-03-07 Thread Ashim Kapoor
Before..."); print_r($globals); foreach (array( 'GLOBALS', '_ENV', 'HTTP_ENV_VARS', '_POST', 'HTTP_POST_VARS', '_GET', 'HTTP_GET_VARS', '_COOKIE', 'HTTP_COOKIE_VARS', '_SERVER', 'HTTP_SERVER_VARS',

Re: [PHP] $GLOBALS example script on php.net

2011-03-07 Thread FeIn
I am unable to provide a better definition that "user defined variables". User defined variables are variables that are declared by the user. User here means the creator (or maintainer of the script). So for: After..."); print_r($globals); return $globals; } globals(); ?> You will g

Re: [PHP] $GLOBALS example script on php.net

2011-03-06 Thread Ashim Kapoor
Unsetting doesn't leave user defined variables. Unsetting simply destroys > variables (or removes elements from an array, etc). There is nothing magic > or hidden in that script. I think the note meant exactly what it said: after > creating a local copy of the $GLOBALS array and removing super glob

Re: [PHP] $GLOBALS example script on php.net

2011-03-06 Thread FeIn
Unsetting doesn't leave user defined variables. Unsetting simply destroys variables (or removes elements from an array, etc). There is nothing magic or hidden in that script. I think the note meant exactly what it said: after creating a local copy of the $GLOBALS array and removing super globals fr

Re: [PHP] $GLOBALS example script on php.net

2011-03-06 Thread Ashim Kapoor
It doesn't though, it creates a copy of the $_GLOBALS super global array, removes entries that will have been set by the system (i.e. it leaves user-defined variables) and then returns the ones that are left, so in that, the user note is perfectly correct. What has me puzzled is how unsetting LEAV

Re: [PHP] $GLOBALS example script on php.net

2011-03-05 Thread Ashim Kapoor
Dear Ashley, I do follow the part when it creates a local copy of $GLOBALS. When it unsets them, is there a subtlety of unset that it ONLY unsets system defined entries? Could you please explain this ? Thank you, Ashim

Re: [PHP] $GLOBALS example script on php.net

2011-03-05 Thread Daniel Brown
On Sat, Mar 5, 2011 at 05:42, David Hutto wrote: > > I'd guest they had been granted access to the php.net page editor, but > I may be wrong. Not that that site hasn't been scraped by other sites > and added to their content, or been catalogued by google cache or > alexis, etc. Richard is par

Re: [PHP] $GLOBALS example script on php.net

2011-03-05 Thread David Hutto
On Sat, Mar 5, 2011 at 5:10 AM, Ashim Kapoor wrote: >> >> I'll remove it. >> > >  How does one remove user notes from  php.net ? > I'd guest they had been granted access to the php.net page editor, but I may be wrong. Not that that site hasn't been scraped by other sites and added to their conten

Re: [PHP] $GLOBALS example script on php.net

2011-03-05 Thread Ashim Kapoor
> > I'll remove it. > How does one remove user notes from php.net ? Thank you, Ashim

Re: [PHP] $GLOBALS example script on php.net

2011-03-05 Thread Richard Quadling
On 5 March 2011 05:44, Ashim Kapoor wrote: > Dear all, > > I was reading this page > http://php.net/manual/en/reserved.variables.globals.php and  I found the > following script there : > > > Here's a function which returns an array of all user defined global > variables: > > function globals

[PHP] $GLOBALS example script on php.net

2011-03-04 Thread Ashim Kapoor
Dear all, I was reading this page http://php.net/manual/en/reserved.variables.globals.php and I found the following script there : Here's a function which returns an array of all user defined global variables: I think that this script UNSETS each supergobal variable,but page says that i