Some of my functions have lots of variables currently accessed through the keyword
global.
e.g.
Code:
function loginForm($errorMessage = "no_error")
{
global $self;
global $loginMessage;
global $loginPassword;
global $loginUsername;
global $loginKeepLogged;
global $loginSubmit;
global $loginReset;
global $loginLanguage;
global $loginDefaultLang;
global $loginTheme;
global $loginDefaultTheme;
...rest of function
}
I think maybe I can put all these variables by reference into an array (using a new function) and just pass the array by reference to the function. Would this work? A variable passed by reference twice, would the original still get upadated?