Welcome to WebmasterWorld Guest from 18.104.22.168 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Become a Pro Member
Session vs Local variable Effiecency HeadBut
I would like to internationalize my application. I'm looking at setting a bunch of variables in an include file. Should I use $_SESSION Variables or $Local variables. Which it more effecient and what are the drawbacks? Is my approach flawed? Is there a limit to the number of $_SESSION Vars I can use?
If you are going to want access to different variables across the site you are going to want to use sessions [ php.net] and not regular local variables. After all, this is what they are for ;)
I'd say that both are pretty much going to have the same
As for the limit of sessions, I'm not quite sure, but I believe it varies from browser to browser.
Is there a limit to the number of $_SESSION Vars I can use?
Storing an excessive amount of data in the session can dramatically slow down your page loads.
Read jatar_k's experience with this issue. [ webmasterworld.com]