Specifically with respect to global variables, here is my recommendation for their prefix: Whenever you want to use the prefix for a global variable stop whatever you are doing! You are in the process of …

Don't even get me started on singletons, there are cases when they are valid (when they don't hold state), any other use of singletons is a euphemism for … As others have noted, you need to declare a variable global in a function when you want that function to be able to modify the global variable. If you only want to access it, then you don't need global. A good way to create public/global variables is to treat the form like a class object and declare properties and use public property get [variable] to access property/method.