<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.sessionhandlerinterface.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'es',
  ),
  'this' => 
  array (
    0 => 'sessionhandlerinterface.gc.php',
    1 => 'SessionHandlerInterface::gc',
    2 => 'Limpia las sesiones antiguas',
  ),
  'up' => 
  array (
    0 => 'class.sessionhandlerinterface.php',
    1 => 'SessionHandlerInterface',
  ),
  'prev' => 
  array (
    0 => 'sessionhandlerinterface.destroy.php',
    1 => 'SessionHandlerInterface::destroy',
  ),
  'next' => 
  array (
    0 => 'sessionhandlerinterface.open.php',
    1 => 'SessionHandlerInterface::open',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/session/sessionhandlerinterface/gc.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="sessionhandlerinterface.gc" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SessionHandlerInterface::gc</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.4.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">SessionHandlerInterface::gc</span> &mdash; <span class="dc-title">Limpia las sesiones antiguas</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-sessionhandlerinterface.gc-description">
  <h3 class="title">Descripción</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>SessionHandlerInterface::gc</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$max_lifetime</code></span>): <span class="type"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Limpia las sesiones antiguas expiradas. Es llamada por <span class="function"><a href="function.session-start.php" class="function">session_start()</a></span>,
   en función de <a href="session.configuration.php#ini.session.gc-divisor" class="link">session.gc_divisor</a>,
   <a href="session.configuration.php#ini.session.gc-probability" class="link">session.gc_probability</a> y
   <a href="session.configuration.php#ini.session.gc-maxlifetime" class="link">session.gc_maxlifetime</a>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-sessionhandlerinterface.gc-parameters">
  <h3 class="title">Parámetros</h3>
  <dl>
   
    <dt><code class="parameter">max_lifetime</code></dt>
    <dd>
     <p class="para">
      Las sesiones que no han sido actualizadas durante las últimas <code class="parameter">max_lifetime</code> segundos serán eliminadas.
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-sessionhandlerinterface.gc-returnvalues">
  <h3 class="title">Valores devueltos</h3>
  <p class="para">
   Devuelve el número de sesiones eliminadas en caso de éxito,  o <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> si ocurre un error.
   Nota que este valor se devuelve internamente a PHP para su procesamiento.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-sessionhandlerinterface.gc-changelog">
  <h3 class="title">Historial de cambios</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Versión</th>
      <th>Descripción</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>7.1.0</td>
      <td>
       Antes de esta versión, la función devolvía <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> en caso de éxito.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


</div><?php manual_footer($setup); ?>