On 11/7/2011 10:39, 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)?
I've almost always been able to avoid globals when writing 
object-oriented web applications.  However, it was a question I also 
contemplated recently when trying to decide the best way to make my 
application configuration settings globally accessible (so I'd be 
interested to hear people's preferred method on that as well).  The 
singleton approach that Walt mentioned seems the most appropriate to me, 
so far.

What situation are you considering using globals for?

Mike




_______________________________________________

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

Reply via email to