PHP.nl

shmop_read

shmop_read

Read data from shared memory block

string **shmop_read** Shmop $shmop int $offset int $size
will read a string from shared memory block.

shmop_read

shmop The shared memory block identifier created by

 `shmop_open`

offsetOffset from which to start reading; must be greater than or equal to zero and less than or equal to the actual size of the shared memory segment.

size The number of bytes to read; must be greater than or equal to zero, and the sum of and must be less than or equal to the actual size of the shared memory segment. reads bytes. offset``size``0``shmop_size($shmid) - $start

Returns the data.

If or are out of range, a is thrown. offset``size``ValueError

Voorbeeld: Reading shared memory block

<?php
$shm_data = shmop_read($shm_id, 0, 50);
?>

This example will read 50 bytes from shared memory block and place the data inside . $shm_data

shmop_write