Php super super globals

I was wondering, I have this large array, is it possible to have it only once in memory, and not once in a stream? Take the tags here, for example in stackoverflow. They almost never change, why do they have no place for memory? And maybe even keep this array permanently in memory?

+5
source share
4 answers

Take a look at apc_store

Unlike many other PHP mechanisms, variables stored using apc_store () will persist between requests (until the value is removed from the cache).

+4
source
+2

php- . java, , , , JVM .

, ( ), , php script, - , APC, memcache

APC.

+1

No - the synchronization problems inherent in sharing a single variable directly between PHP interpreters make this impossible. Most likely, Qaru simply avoids the “think about everything” array of tags at once.

You can use the variable storage functions in APC ( apc_store and apc_fetch ) to store serialized data in shared memory.

0
source

All Articles