tags:

views:

175

answers:

3

Hello, I need to share same array object across all requests irrespective of requests coming from same browser/user. Is there any application scope in php where I could store that array object. I am using php 5.x .

+3  A: 

Some extensions, like APC or Zend Cache allow you to mimic application-scope.
If none are available to you, you can cache the object in a file or DB.

Itay Moav
+1  A: 

you probably want to use sessions

handsomeGun
but session is specific to client/browser , I need all requests to share same object
Xinus
+7  A: 

If you want to share it across all requests on a per user basis, using sessions is probably the way to go.

If you want to share it across all requests of all users, you have to store it in the database, on disk or keep it in memory, e.g. using memcache or memcached.

middus