note 86406 deleted from reserved.variables.globals by danbrown
| From: | danbrown@php.net | Date: | Tue, 12 May 2009 19:25:11 +0000 |
| Subject: | note 86406 deleted from reserved.variables.globals by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-154524@lists.php.net to get a copy of this message | ||
Note Submitter: Pyornide
----
I strongly recommend against using globals at all possible. It's a bad programming practice,
and you're better off using references and passing them on construct to use them in the $this
context. If you're worried about parameters, you can simply use an associative array to store
any passed variables to it. Overall, the main idea is to avoid using globals.
http://www.phpit.net/article/using-globals-php/
Is a good article detailing other reasons why using the global scope is a very bad idea.