shm_get_var

mixed shm_get_var(int shm_id, int variable_key) 
shm_id ID of a shared memory segment
variable_key Key number of variable to retrieve

Fetches and returns a variable from shared memory.

Returns:

Value from shared memory; FALSE on error

Description:

shm_get_var() returns the variable identified by variable_key from the shared memory segment identified by shm_id . variable_key must be an integer or evaluate to an integer. If shm_id is not a valid identifier as returned by shm_attach(), or if there is no stored variable with the key given by variable_key , shm_get_var() returns FALSE.

Version:

PHP 3 since 3.0.6, PHP 4

See also:

shm_attach() 
shm_detach() 
shm_put_var() 
shm_remove() 
shm_remove_var() 

Example:

Read a stored variable ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.