* A numeric shared memory segment ID *

* @param int|null $size [optional]

* The memory size. If not provided, default to the * sysvshm.init_mem in the php.ini, otherwise 10000 * bytes. *

* @param int $permissions [optional]

* The optional permission bits. Default to 0666. *

* @return resource|SysvSharedMemory|false a shared memory segment identifier. */ #[LanguageLevelTypeAware(["8.0" => "SysvSharedMemory|false"], default: "resource|false")] function shm_attach(int $key, ?int $size, int $permissions = 0666) {} /** * Removes shared memory from Unix systems * @link https://php.net/manual/en/function.shm-remove.php * @param SysvSharedMemory $shm

* The shared memory identifier as returned by * shm_attach *

* @return bool TRUE on success or FALSE on failure. */ function shm_remove(#[LanguageLevelTypeAware(["8.0" => "SysvSharedMemory"], default: "resource")] $shm): bool {} /** * Disconnects from shared memory segment * @link https://php.net/manual/en/function.shm-detach.php * @param SysvSharedMemory $shm

* A shared memory resource handle as returned by * shm_attach *

* @return bool shm_detach always returns TRUE. */ function shm_detach(#[LanguageLevelTypeAware(["8.0" => "SysvSharedMemory"], default: "resource")] $shm): bool {} /** * Inserts or updates a variable in shared memory * @link https://php.net/manual/en/function.shm-put-var.php * @param SysvSharedMemory $shm

* A shared memory resource handle as returned by * shm_attach *

* @param int $key

* The variable key. *

* @param mixed $value

* The variable. All variable types * that serialize supports may be used: generally * this means all types except for resources and some internal objects * that cannot be serialized. *

* @return bool TRUE on success or FALSE on failure. */ function shm_put_var(#[LanguageLevelTypeAware(["8.0" => "SysvSharedMemory"], default: "resource")] $shm, int $key, mixed $value): bool {} /** * Check whether a specific entry exists * @link https://php.net/manual/en/function.shm-has-var.php * @param SysvSharedMemory $shm

* Shared memory segment, obtained from shm_attach. *

* @param int $key

* The variable key. *

* @return bool TRUE if the entry exists, otherwise FALSE */ function shm_has_var(#[LanguageLevelTypeAware(["8.0" => "SysvSharedMemory"], default: "resource")] $shm, int $key): bool {} /** * Returns a variable from shared memory * @link https://php.net/manual/en/function.shm-get-var.php * @param SysvSharedMemory $shm

* Shared memory segment, obtained from shm_attach. *

* @param int $key

* The variable key. *

* @return mixed the variable with the given key. */ function shm_get_var(#[LanguageLevelTypeAware(["8.0" => "SysvSharedMemory"], default: "resource")] $shm, int $key): mixed {} /** * Removes a variable from shared memory * @link https://php.net/manual/en/function.shm-remove-var.php * @param SysvSharedMemory $shm

* The shared memory identifier as returned by * shm_attach *

* @param int $key

* The variable key. *

* @return bool TRUE on success or FALSE on failure. */ function shm_remove_var(#[LanguageLevelTypeAware(["8.0" => "SysvSharedMemory"], default: "resource")] $shm, int $key): bool {} /** * @since 8.0 */ final class SysvSharedMemory { /** * Cannot directly construct SysvSharedMemory, use shm_attach() instead * @see shm_attach() */ private function __construct() {} } // End of sysvshm v.