SyncSemaphore::unlock

(PECL sync >= 1.0.0) Increases the count of the semaphore public bool SyncSemaphore::unlock ([ integer &$prevcount ] ) Increases the count of a SyncSemaphore object. Parameters: prevcount Returns the previous count of the semaphore. Returns: A boolean of TRUE if the unlock operation was successful, FALSE otherwise.

SyncSemaphore::lock

(PECL sync >= 1.0.0) Decreases the count of the semaphore or waits public bool SyncSemaphore::lock ([ integer $wait ] ) Decreases the count of a SyncSemaphore object or waits until the semaphore becomes non-zero. Parameters: wait The number of milliseconds to wait for the semaphore. A value of -1 is infinite. Returns: A boolean of TRUE if the

SyncSemaphore::__construct

(PECL sync >= 1.0.0) Constructs a new SyncSemaphore object public SyncSemaphore::__construct ([ string $name [, integer $initialval [, bool $autounlock ]]] ) Constructs a named or unnamed semaphore. Parameters: name The name of the semaphore if this is a named semaphore object. Note: If the name already exists, it must be able to be opened by the current user that

SyncMutex::unlock

(PECL sync >= 1.0.0) Unlocks the mutex public bool SyncMutex::unlock ([ bool $all ] ) Decreases the internal counter of a SyncMutex object. When the internal counter reaches zero, the actual lock on the object is released. Parameters: all Specifies whether or not to set the internal counter to zero and therefore release the lock. Returns: A bo

SyncMutex::lock

(PECL sync >= 1.0.0) Waits for an exclusive lock public bool SyncMutex::lock ([ integer $wait ] ) Obtains an exclusive lock on a SyncMutex object. If the lock is already acquired, then this increments an internal counter. Parameters: wait The number of milliseconds to wait for the exclusive lock. A value of -1 is infinite. Returns: A boolean o

SyncMutex::__construct

(PECL sync >= 1.0.0) Constructs a new SyncMutex object public SyncMutex::__construct ([ string $name ] ) Constructs a named or unnamed countable mutex. Parameters: name The name of the mutex if this is a named mutex object. Note: If the name already exists, it must be able to be opened by the current user that the process is running as or an exception will be throw

shmop_write

(PHP 4 >= 4.0.4, PHP 5, PHP 7) Write data into shared memory block int shmop_write ( int $shmid, string $data, int $offset ) shmop_write() will write a string into shared memory block. Parameters: shmid The shared memory block identifier created by shmop_open() data A string to write into shared memory block of

shmop_size

(PHP 4 >= 4.0.4, PHP 5, PHP 7) Get size of shared memory block int shmop_size ( int $shmid ) shmop_size() is used to get the size, in bytes of the shared memory block. Parameters: shmid The shared memory block identifier created by shmop_open() Returns: Returns an int, which represents the number of bytes the shared memory block occupies.

shmop_read

(PHP 4 >= 4.0.4, PHP 5, PHP 7) Read data from shared memory block string shmop_read ( int $shmid, int $start, int $count ) shmop_read() will read a string from shared memory block. Parameters: shmid The shared memory block identifier created by shmop_open() start Offset from which to start reading count

shmop_open

(PHP 4 >= 4.0.4, PHP 5, PHP 7) Create or open shared memory block int shmop_open ( int $key, string $flags, int $mode, int $size ) shmop_open() can create or open a shared memory block. Parameters: key System's id for the shared memory block. Can be passed as a decimal or hex. flags The flags that you can use: "a" for access (sets