Welcome to WebmasterWorld Guest from 22.214.171.124 , register , free tools , login , search , subscribe , help , library , announcements , recent posts , open posts Subscribe to WebmasterWorld
Session vs Local variable Effiecency HeadBut msg:3304003 5:22 am on Apr 6, 2007 (gmt 0) 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?
eelixduppy msg:3304018 5:49 am on Apr 6, 2007 (gmt 0)
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.
whoisgregg msg:3304206 1:11 pm on Apr 6, 2007 (gmt 0)
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]