shmop_delete

bool shmop_delete(int shmop_id) 

Deletes a shared memory segment.

Returns:

TRUE on success; FALSE on failure

Description:

shmop_delete() deletes the shared memory segment identified by shmop_id . If shmod_id is not a valid identifier as returned by shmop_open(), or if for some reason the segment cannot be deleted (permissions, for instance), FALSE is returned and the function fails.

Note that the segment isn’t necessarily deleted immediately. Rather, it’s marked for deletion, and is destroyed and its memory freed only after the last process to be attached to it has detached from it.

Version:

PHP 4 since 4.0.3

See also:

shmop_close() 
shmop_open() 
shmop_read() 
shmop_size() 
shmop_write() 

Example:

Delete a shared memory segment

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.