The Wikipedia article corresponds with my experience using them:

http://en.wikipedia.org/wiki/Global_variable

The problem is to keep track of what part of the program is changing 
which global under what circumstances.  Certain globals, such as the 
session description, are unavoidable.  For other shared information, I 
find that defining a singleton object is a better tool because I can 
more easily identify who is using it.

-- Walt

On 11/07/2011 10:39 AM, Wade Preston Shearer wrote:
> What are the groups thoughts on use of the $GLOBALS superglobal and using the 
> global command to pull variables into scope? Are there times when using these 
> are considered good practice or would good architecture always provide an 
> alternate solution (such as passing the variable into the function)?
>
> _______________________________________________
>
> UPHPU mailing list
> [email protected]
> http://uphpu.org/mailman/listinfo/uphpu
> IRC: #uphpu on irc.freenode.net


_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to