shmop_write
shmop_write
Write data into shared memory block
int **shmop_write** Shmop $shmop string $data int $offset
will write a string into shared memory block.
shmop_write
shmop
The shared memory block identifier created by
`shmop_open`
dataA string to write into shared memory block
offsetSpecifies where to start writing data inside the shared memory
segment. The offset must be greater than or equal to zero
and less than or equal to the actual size of the shared memory segment.
The size of the written .
data
If is out of range, or a read-only shared memory segment
should be written to, a is thrown.
offset``ValueError
Voorbeeld: Writing to shared memory block
<?php
$shm_bytes_written = shmop_write($shm_id, $my_string, 0);
?>
This example will write data inside into
shared memory block, will contain
the number of bytes written.
$my_string``$shm_bytes_written
shmop_read