<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.sem.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.shm-put-var.php',
    1 => 'shm_put_var',
    2 => 'Inserts or updates a variable in shared memory',
  ),
  'up' => 
  array (
    0 => 'ref.sem.php',
    1 => 'Semaphore Функції',
  ),
  'prev' => 
  array (
    0 => 'function.shm-has-var.php',
    1 => 'shm_has_var',
  ),
  'next' => 
  array (
    0 => 'function.shm-remove.php',
    1 => 'shm_remove',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/sem/functions/shm-put-var.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.shm-put-var" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">shm_put_var</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">shm_put_var</span> &mdash; <span class="dc-title">Inserts or updates a variable in shared memory</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.shm-put-var-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>shm_put_var</strong></span>(<span class="methodparam"><span class="type"><a href="class.sysvsharedmemory.php" class="type SysvSharedMemory">SysvSharedMemory</a></span> <code class="parameter">$shm</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>shm_put_var()</strong></span> inserts or updates the
   <code class="parameter">value</code> with the given
   <code class="parameter">key</code>.
  </p>
  <p class="para">
   Warnings (<strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> level) will be issued if
   <code class="parameter">shm</code> is not a valid SysV shared memory
   index or if there was not enough shared memory remaining to complete your
   request.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.shm-put-var-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">shm</code></dt>
     <dd>
      <p class="para">
       A shared memory segment obtained from <span class="function"><a href="function.shm-attach.php" class="function">shm_attach()</a></span>.
      </p>
     </dd>
    
    
     <dt><code class="parameter">key</code></dt>
     <dd>
      <p class="para">
       The variable key.
      </p>
     </dd>
    
    
     <dt><code class="parameter">value</code></dt>
     <dd>
      <p class="para">
       The variable. All <a href="language.types.php" class="link">variable types</a>
       that <span class="function"><a href="function.serialize.php" class="function">serialize()</a></span> supports may be used: generally
       this means all types except for resources and some internal objects
       that cannot be serialized.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.shm-put-var-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Повертає <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> у разі успіху або <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> в разі помилки.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.shm-put-var-changelog">
  <h3 class="title">Журнал змін</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Версія</th>
       <th>Опис</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>8.0.0</td>
       <td>
        <code class="parameter">shm</code> expects a <span class="classname"><a href="class.sysvsharedmemory.php" class="classname">SysvSharedMemory</a></span>
        instance now; previously, a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> was expected.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>

 
 <div class="refsect1 seealso" id="refsect1-function.shm-put-var-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.shm-get-var.php" class="function" rel="rdfs-seeAlso">shm_get_var()</a> - Returns a variable from shared memory</span></li>
    <li><span class="function"><a href="function.shm-has-var.php" class="function" rel="rdfs-seeAlso">shm_has_var()</a> - Check whether a specific entry exists</span></li>
   </ul>
  </p>
 </div>


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