<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.sessionhandler.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'sessionhandler.write.php',
    1 => 'SessionHandler::write',
    2 => 'Write session data',
  ),
  'up' => 
  array (
    0 => 'class.sessionhandler.php',
    1 => 'SessionHandler',
  ),
  'prev' => 
  array (
    0 => 'sessionhandler.read.php',
    1 => 'SessionHandler::read',
  ),
  'next' => 
  array (
    0 => 'class.sessionhandlerinterface.php',
    1 => 'SessionHandlerInterface',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/session/sessionhandler/write.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="sessionhandler.write" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SessionHandler::write</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.4.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">SessionHandler::write</span> &mdash; <span class="dc-title">Write session data</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-sessionhandler.write-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>SessionHandler::write</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$id</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$data</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Writes the session data to the session storage. Called by normal PHP shutdown, by
   <span class="function"><a href="function.session-write-close.php" class="function">session_write_close()</a></span>, or when <span class="function"><a href="function.session-register-shutdown.php" class="function">session_register_shutdown()</a></span> fails.
   PHP will call <span class="function"><a href="sessionhandler.close.php" class="function">SessionHandler::close()</a></span> immediately after this method returns.
  </p>
  <p class="para">
   This method wraps the internal PHP save handler defined in the
   <a href="session.configuration.php#ini.session.save-handler" class="link">session.save_handler</a> ini setting that was set
   before this handler was set by <span class="function"><a href="function.session-set-save-handler.php" class="function">session_set_save_handler()</a></span>.
  </p>
  <p class="para">
   If this class is extended by inheritance, calling the parent <code class="parameter">write</code> method will invoke the
   wrapper for this method and therefore invoke the associated internal callback.  This allows this method to be
   overridden and or intercepted and filtered (for example, encrypting the <code class="parameter">$data</code> value
   before sending it to the parent <code class="parameter">write</code> method).
  </p>
  <p class="para">
   For more information on what this method is expected to do, please refer to the documentation
   at <span class="function"><a href="sessionhandlerinterface.write.php" class="function">SessionHandlerInterface::write()</a></span>.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-sessionhandler.write-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <dl>
   
    <dt><code class="parameter">id</code></dt>
    <dd>
     <p class="para">
      The session id.
     </p>
    </dd>
   
   
    <dt><code class="parameter">data</code></dt>
    <dd>
     <p class="para">
      The encoded session data.  This data is the result of the PHP internally encoding the <var class="varname"><a href="reserved.variables.session.php" class="classname">$_SESSION</a></var> superglobal to a serialized
      string and passing it as this parameter.  Please note sessions use an alternative serialization method.
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-sessionhandler.write-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   Il valore di ritorno (normalmente <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> in caso di successo, altrimenti <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>). Si noti che questo valore è restituito internamente a PHP per il processamento.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-sessionhandler.write-seealso">
  <h3 class="title">Vedere anche:</h3>
  <p class="para">
   <ul class="simplelist">
    <li>
     The <a href="session.configuration.php#ini.session.serialize-handler" class="link">session.serialize_handler</a>
     configuration directive.
    </li>
   </ul>
  </p>
 </div>



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