WARNING: this function WILL NOT destroy the memory segment if there are other processes attached to it, but it will return TRUE anyways!
You will have to try to access the segment again after destroying it to make sure it was relly destroyed.
PHP.mk документација
shm_remove
Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.
Патека
function.shm-remove.php
Локална патека за оваа страница.
Извор
php.net/manual/en
Оригиналниот HTML се реупотребува и локално се стилизира.
Режим
Прокси + превод во позадина
Кодовите, табелите и белешките остануваат читливи во истиот тек.
Референца
function.shm-remove.php
shm_remove
Референца за `function.shm-remove.php` со подобрена типографија и навигација.
shm_remove
(PHP 4, PHP 5, PHP 7, PHP 8)
shm_remove — Removes shared memory from Unix systems
= NULL
shm_remove() Ги отстранува мемориите за споделување од Unix системи
shmја отстранува меморијата за споделување
Параметри
shm- . Сите податоци ќе бидат уништени. shm_attach().
Вратени вредности
Патеката до PHP скриптата што треба да се провери. true на успех или false при неуспех.
Дневник на промени
| Верзија | = NULL |
|---|---|
| 8.0.0 |
shm беше вратено при неуспех. SysvSharedMemory
инстанца сега; претходно, а resource се очекуваше.
|
Види Исто така
- shm_remove_var() Сегмент за споделена меморија добиен од
Белешки од корисници 3 белешки
HansRich ¶
пред 11 години
- Отстранува променлива од меморијата за споделување ¶
19 години пред
It appears that you must be connected to the shm segment in order to remove it.
<?php
shm_remove($shm);
shm_detach($shm);
?>
works, while
<?php
shm_detach($shm);
shm_remove($shm);
?>
produces "Warning: shm_remove(): The parameter is not a valid shm_identifier ..."
aaron DURP segura DURP gmail DURP com ¶
ian at eiloart dot com
Though it says **shm_identifier** in
int shm_remove(int shm_identifier);
and
shm_attach() returns an **id** that that can be used to access the System V...
a snippet like this:
<?php
$key = 1234;
$shm=shm_attach($key);
// do whatever...
shm_remove($shm);
?>
produces an error like
Warning: 2(which is the value of $shm) is not a existing SysV shared memory key in /usr/cu/web/sema.php on line 44...
The documentation confused me a bit. I thought shm_remove would get the shm handle/id that returns from shm_attach, not the key given to shm_attach. So, use instead:
shm_remove($key);
which is what is intended indeed.