shm_remove_var

bool shm_remove_var(int shm_id, int variable_key) 
shm_id ID of a shared memory segment
variable_key Name of variable to remove

Removes a variable from shared memory.

Returns:

TRUE on success; FALSE on failure

Description:

shm_remove_var() removes the variable named by variable_key from the shared memory segment identified by shm_id . FALSE is returned if variable_key is not present in the segment, or if shm_id is not a valid identifier as returned by shm_attach().

Version:

PHP 3 since 3.0.6, PHP 4

See also:

shm_attach() 
shm_detach() 
shm_get_var() 
shm_put_var() 
shm_remove() 

Example:

Remove a variable from shared memory
 if (!@shm_remove_var($shm_id, $varname)) { echo "Failed to remove variable '$varname'; reason: $php_errormsg\n"; ...

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.