<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.shmop.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'tr',
  ),
  'this' => 
  array (
    0 => 'function.shmop-write.php',
    1 => 'shmop_write',
    2 => 'Write data into shared memory block',
  ),
  'up' => 
  array (
    0 => 'ref.shmop.php',
    1 => 'Shared Memory İşlevleri',
  ),
  'prev' => 
  array (
    0 => 'function.shmop-size.php',
    1 => 'shmop_size',
  ),
  'next' => 
  array (
    0 => 'class.shmop.php',
    1 => 'Shmop',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/shmop/functions/shmop-write.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.shmop-write" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">shmop_write</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">shmop_write</span> &mdash; <span class="dc-title">Write data into shared memory block</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.shmop-write-description">
  <h3 class="title">Açıklama</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>shmop_write</strong></span>(<span class="methodparam"><span class="type"><a href="class.shmop.php" class="type Shmop">Shmop</a></span> <code class="parameter">$shmop</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="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$offset</code></span>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

  <p class="simpara">
   <span class="function"><strong>shmop_write()</strong></span> will write a string into shared memory block.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.shmop-write-parameters">
  <h3 class="title">Bağımsız Değişkenler</h3>
  <dl>
   
    <dt><code class="parameter">shmop</code></dt>
    <dd>
     <span class="simpara">
      The shared memory block identifier created by
      <span class="function"><a href="function.shmop-open.php" class="function">shmop_open()</a></span>
     </span>
    </dd>
   
   
    <dt><code class="parameter">data</code></dt>
    <dd>
     <span class="simpara">
      A string to write into shared memory block
     </span>
    </dd>
   
   
    <dt><code class="parameter">offset</code></dt>
    <dd>
     <span class="simpara">
      Specifies where to start writing data inside the shared memory
      segment. The offset must be greater than or equal to zero
      and less than or equal to the actual size of the shared memory segment.
     </span>
    </dd>
   
  </dl>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.shmop-write-returnvalues">
  <h3 class="title">Dönen Değerler</h3>
  <p class="simpara">
   The size of the written <code class="parameter">data</code>.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.shmop-write-errors">
  <h3 class="title">Hatalar/İstisnalar</h3>
  <p class="simpara">
   If <code class="parameter">offset</code> is out of range, or a read-only shared memory segment
   should be written to, a <span class="classname"><a href="class.valueerror.php" class="classname">ValueError</a></span> is thrown.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.shmop-write-changelog">
  <h3 class="title">Sürüm Bilgisi</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Sürüm: </th>
      <th>Açıklama</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       Prior to PHP 8.0.0, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> was returned on failure.
      </td>
     </tr>

     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">shmop</code> expects a <span class="classname"><a href="class.shmop.php" class="classname">Shmop</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>

 </div>


 <div class="refsect1 examples" id="refsect1-function.shmop-write-examples">
  <h3 class="title">Örnekler</h3>
  <div class="example" id="example-1">
   <p><strong>Örnek 1 Writing to shared memory block</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$shm_bytes_written </span><span style="color: #007700">= </span><span style="color: #0000BB">shmop_write</span><span style="color: #007700">(</span><span style="color: #0000BB">$shm_id</span><span style="color: #007700">, </span><span style="color: #0000BB">$my_string</span><span style="color: #007700">, </span><span style="color: #0000BB">0</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

  </div>
  <p class="simpara">
   This example will write data inside <code class="literal">$my_string</code> into
   shared memory block, <code class="literal">$shm_bytes_written</code> will contain
   the number of bytes written.
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.shmop-write-seealso">
  <h3 class="title">Ayrıca Bakınız</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.shmop-read.php" class="function" rel="rdfs-seeAlso">shmop_read()</a> - Read data from shared memory block</span></li>
  </ul>
 </div>

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