I have a pretty long extensive function, and the only thing that would change for me to use it elsewhere in the application would be to change the global
variable declared inside of it.
function some_function() {
global $sys;
// ... Do stuff
}
some_function();
I need to change global $sys;
to global $lang;
or possibly a few other things, but everything else would stay the same. I was thinking something like:
function some_function($global_var) {
global $global_var;
// ... Do stuff
}
some_function($sys);
... or maybe ...
some_function($lang);
How can this be done?