shmop_write

int shmop_write(int shmop_id, string data, int offset) 
shmop_id ID of a shared memory segment
data Data to write to shared memory
offset Number of bytes from the beginning of the segment

Stores a string in a shared memory segment.

Returns:

Number of bytes written; FALSE on error

Description:

shmop_write() stores the string given in data into the shared memory segment identified by shmop_id . The string is written into the segment starting from the offset given by offset (counting starts from 0). You can test that all data was written by comparing the return value to the string length of the data.

Version:

PHP 4 since 4.0.3

See also:

shmop_close() 
shmop_delete() 
shmop_open() 
shmop_read() 
shmop_size() 

Example:

Store a string ...

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.