// Avoid this function badFunction() { global $someGlobalVar; // ... do something with $someGlobalVar } // Prefer this function betterFunction($someVar) { // ... do something with $someVar }
// Avoid this function badFunction() { global $someGlobalVar; // ... do something with $someGlobalVar } // Prefer this function betterFunction($someVar) { // ... do something with $someVar }