shmop_size

int shmop_size(int shmop_id) 

Returns the size of a shared memory segment.

Returns:

Size of the shared memory segment; FALSE on failure

Description:

shmop_size() returns the total size in bytes of the shared memory segment identified by shmop_id . This is the size that the segment was defined to have at the time it was created, and not the size of any data that may have been written to it.

If shmop_id is not a valid identifier as returned by shmop_open(), FALSE is returned.

Version:

PHP 4 since 4.0.3

See also:

shmop_close() 
shmop_delete() 
shmop_open() 
shmop_read() 
shmop_write() 

Example:

Show the size of a shared memory segment
 if (($size = @shmop_size($shm_id)) === FALSE) { die("Failed to get the size of the segment; 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.