Home > PHP > Function > Semaphore > shm_put_var()

shm_put_var()

shm_put_var - Inserts or updates a variable in shared memory

Syntax

bool shm_put_var (resource $shm_identifier, int $variable_key, mixed $variable)

Arguments

  • shm_identifier - A shared memory resource handle as returned by shm_attach()
  • variable_key - The variable key.
  • variable - The variable. All variable-typesare supported.

Description

shm_put_var() inserts or updates the variable with the given variable_key.

Version

PHP 4, 5

Return value

Returns TRUE on success or FALSE on failure.