Quote Originally Posted by kyberfabrikken
As a rule of thumb, globals are evil.

Or a bit more pronounced - A global is accessible from anywhere in the entire program. Each time you introduce a global, you thus potentially affect any part of your application. This means that with a complex application, the consequences are incomprehensible.
Possibly worse though, is that whenever someone (for example a thirdparty developer) needs to write any piece of code which interacts with you application (or indeed just run alongside it), the programmer will need to take each and every global into consideration.
This reminds me of a contract I had to work on, fixing someone else code. Instead of using regular function parameters, the previous programmer would pass data into functions by writing values into the $_POST array. As you can imagine, this was a nightmare to debug.