Maybe it has to do with the fact that the $GLOBALS[] array has a copy of itself inside the parent.
kinda weird but it looks like this $GLOBALS['key1'] = 'value1'; $GLOBALS['key2'] = 'value2'; $GLOBALS['GLOBALS']['key1'] = 'value1'; $GLOBALS['GLOBALS']['key2'] = 'value2'; don't ask me why, but it seems odd to me to do this. A little redundant if you ask me. Jim Lucas ----- Original Message ----- From: "Chris Boget" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent: Friday, August 01, 2003 12:17 PM Subject: Re: [PHP] Globals > > > I'm curious if someone could explain to me why this is occuring: > > > > function blah() { > > //global $GLOBALS; > > echo 'Globals: <pre>'; print_r( $GLOBALS ); echo '</pre>'; > > > > } > > > > As it is shown above, with the 'global $GLOBALS' line commented > > out, the print_r() works and shows all the currently defined variables > > and their corresponding values. However, if I declare $GLOBALS > > as global, nothing gets printed out. > > > > Why? > > The above is all I really need to know. The rest of my previous email > was the result of a massive brainfart. > Sorry about that... > > Chris > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php