1
0
mirror of https://github.com/php/doc-ru.git synced 2026-03-25 16:22:18 +01:00
Files
archived-doc-ru/reference/session/sessionhandlerinterface/gc.xml
2022-12-16 00:55:54 +03:00

89 lines
2.9 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 601f6f4ce5827d441a7e110184708f0abe9fd447 Maintainer: mch Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="sessionhandlerinterface.gc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>SessionHandlerInterface::gc</refname>
<refpurpose>Очищает старые сессии</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="SessionHandlerInterface">
<modifier>public</modifier> <type class="union"><type>int</type><type>false</type></type><methodname>SessionHandlerInterface::gc</methodname>
<methodparam><type>int</type><parameter>max_lifetime</parameter></methodparam>
</methodsynopsis>
<para>
Очищает сессии с истёкшим сроком жизни. Вызывается функцией <function>session_start</function>,
и основывается на опциях <link linkend="ini.session.gc-divisor">session.gc_divisor</link>,
<link linkend="ini.session.gc-probability">session.gc_probability</link> и
<link linkend="ini.session.gc-maxlifetime">session.gc_maxlifetime</link>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>max_lifetime</parameter></term>
<listitem>
<para>
Сессии, которые не обновлялись в течение <parameter>max_lifetime</parameter> секунд, будут удалены.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Возвращает количество удалённых сессий в случае успешного выполнения&return.falseforfailure;.
Обратите внимание, что это значение возвращается внутри PHP для обработки.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>7.1.0</entry>
<entry>
До этой версии, функция возвращала &true; в случае успешного выполнения.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->