homepage Welcome to WebmasterWorld Guest from 54.211.73.232
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Session vs Local variable
Effiecency
HeadBut

10+ Year Member



 
Msg#: 3304001 posted 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?

Thanks! (B)

 

eelixduppy

WebmasterWorld Senior Member eelixduppy us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 3304001 posted 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 ;)

>> efficiency

I'd say that both are pretty much going to have the same efficiency.

As for the limit of sessions, I'm not quite sure, but I believe it varies from browser to browser.

whoisgregg

WebmasterWorld Senior Member whoisgregg us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3304001 posted 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]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved