globalize vs pass as argument
Moderator: General Moderators
globalize vs pass as argument
Well, the topic is pretty much my question. On the project I am working on I chose to set 'important variables' as session variables and the globalize them (global $HTTP_SESSTION_VARS;) so that they can be accessed within functions. However, I could also call the function and pass that variable as a argument. But my question is, which method do you prefer? Which is safer?
There was a discussion on this not too long ago. Check it out:
viewtopic.php?t=15177
viewtopic.php?t=15177