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 .
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With