<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.session.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.session-encode.php',
    1 => 'session_encode',
    2 => 'Encodes the current session data as a session encoded string',
  ),
  'up' => 
  array (
    0 => 'ref.session.php',
    1 => 'Session Функції',
  ),
  'prev' => 
  array (
    0 => 'function.session-destroy.php',
    1 => 'session_destroy',
  ),
  'next' => 
  array (
    0 => 'function.session-gc.php',
    1 => 'session_gc',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/session/functions/session-encode.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.session-encode" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">session_encode</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">session_encode</span> &mdash; <span class="dc-title">Encodes the current session data as a session encoded string</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.session-encode-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>session_encode</strong></span>(): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>session_encode()</strong></span> returns a serialized string of the
   contents of the current session data stored in the $_SESSION superglobal.
  </p>
  <p class="para">
   By default, the serialization method used is internal to PHP, and is not the same as <span class="function"><a href="function.serialize.php" class="function">serialize()</a></span>.
   The serialization method can be set using <a href="session.configuration.php#ini.session.serialize-handler" class="link">session.serialize_handler</a>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.session-encode-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">У цієї функції немає
параметрів.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.session-encode-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Returns the contents of the current session encoded,  або <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> в разі помилки.
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.session-encode-notes">
  <h3 class="title">Примітки</h3>
  <div class="warning"><strong class="warning">Увага</strong>
   <p class="para">
    Must call <span class="function"><a href="function.session-start.php" class="function">session_start()</a></span> before using <span class="function"><strong>session_encode()</strong></span>.
   </p>
  </div>
 </div>
 
 
 <div class="refsect1 seealso" id="refsect1-function.session-encode-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.session-decode.php" class="function" rel="rdfs-seeAlso">session_decode()</a> - Decodes session data from a session encoded string</span></li>
    <li><a href="session.configuration.php#ini.session.serialize-handler" class="link">session.serialize_handler</a></li>
   </ul>
  </p>
 </div>


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