<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<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>Cleanup old sessions</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>
   Cleans up expired sessions. Called by <function>session_start</function>,
   based on <link linkend="ini.session.gc-divisor">session.gc_divisor</link>,
   <link linkend="ini.session.gc-probability">session.gc_probability</link> and
   <link linkend="ini.session.gc-maxlifetime">session.gc_maxlifetime</link> settings.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <variablelist>
   <varlistentry>
    <term><parameter>max_lifetime</parameter></term>
    <listitem>
     <para>
      Sessions that have not updated for the last <parameter>max_lifetime</parameter> seconds will be removed.
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns the number of deleted sessions on success, &return.falseforfailure;.
   Note this value is returned internally to PHP for processing.
  </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>
       Prior to this version, the function returned &true; on success.
      </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
-->
