PHP.mk документација

gc_collect_cycles

Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.

function.gc-collect-cycles.php PHP.net прокси Преводот се освежува
Оригинал на PHP.net
Патека function.gc-collect-cycles.php Локална патека за оваа страница.
Извор php.net/manual/en Оригиналниот HTML се реупотребува и локално се стилизира.
Режим Прокси + превод во позадина Кодовите, табелите и белешките остануваат читливи во истиот тек.
gc_collect_cycles

Референца за `function.gc-collect-cycles.php` со подобрена типографија и навигација.

function.gc-collect-cycles.php

gc_collect_cycles

(PHP 5 >= 5.3.0, PHP 7, PHP 8)

gc_collect_cyclesПрисилува собирање на сите постоечки циклуси за отпад

= NULL

gc_collect_cycles(): int

Присилува собирање на сите постоечки циклуси за отпад.

Параметри

Оваа функција нема параметри.

Вратени вредности

Враќа број на собрани циклуси.

Види Исто така

Белешки од корисници 2 забелешки

Мејсон
пред 14 години
(Since this function wasn't documented as of the date I left this note...)

If you came here looking for documentation, allow me to point you instead to a section in the user manual about garbage collection that includes a bit at the end about when you would use this feature and what it will actually do: http://php.net/manual/en/features.gc.collecting-cycles.php

Hope it helps!
jab_creations на yahoo точка com
2 месеци пред
I haven't properly confirmed though a lot of people are saying PHP doesn't run garbage collection (e.g. clearing out expired session files) on localhost. Also if this has changed I don't know the old/new version cut-off either.

If this is true then you need to first determine if the client (who you should always verify, never trust) has sent the HTTP_HOST request header. If so, there are the three basic values that you'll see unlike on a live server (you'll instead see something like 'www.example.com' or 'example.com'). Don't forget about modifications you've made on your OS's hosts file (or equivalent). Don't forget any relevant networking/router/modem settings too, again, if applicable.

You could append this to your custom local homepage, setup a maintenance page or if you're running a template system append this after the XML/HTML has been sent though you very likely don't want extra stuff running on your live server only intended for your local server unless you do it after flushing the page and continue processing afterwards:

<?php
if (isset($_SERVER['HTTP_HOST']) && in_array($_SERVER['HTTP_HOST'], array('127.0.0.1','::1','localhost'))
{
 gc_collect_cycles();
}
?>
На оваа страница

Автоматски outline од активната документација.

Насловите ќе се појават тука по вчитување.

Попрегледно читање

Примерите, changelog табелите и user notes се визуелно издвоени за да не се губат во долгата содржина.

Брз совет Користи го outline-от Скокни директно на главните секции од активната страница.
Извор Оригиналниот линк останува достапен Кога ти треба целосен upstream context, отвори го PHP.net во нов tab.