[UPHPU] $GLOBALS and global best practices

Jonathan Duncan jonathan at bluesunhosting.com
Mon Nov 7 12:46:08 MST 2011


On 07 Nov 2011, at 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 do not use them.  Most often I use a framework, and that framework is usually CakePHP.  For kicks, I just did a grep on all the CakePHP libraries and came up empty handed, which means, that even a large open source project like CakePHP does not even use them.  Just some data.



More information about the UPHPU mailing list