<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.memcached.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'memcached.incrementbykey.php',
    1 => 'Memcached::incrementByKey',
    2 => 'Increment numeric item\'s value, stored on a specific server',
  ),
  'up' => 
  array (
    0 => 'class.memcached.php',
    1 => 'Memcached',
  ),
  'prev' => 
  array (
    0 => 'memcached.increment.php',
    1 => 'Memcached::increment',
  ),
  'next' => 
  array (
    0 => 'memcached.ispersistent.php',
    1 => 'Memcached::isPersistent',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/memcached/memcached/incrementbykey.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="memcached.incrementbykey" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Memcached::incrementByKey</h1>
  <p class="verinfo">(PECL memcached &gt;= 2.0.0)</p><p class="refpurpose"><span class="refname">Memcached::incrementByKey</span> &mdash; <span class="dc-title">Increment numeric item&#039;s value, stored on a specific server</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-memcached.incrementbykey-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Memcached::incrementByKey</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$server_key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$offset</code><span class="initializer"> = 1</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$initial_value</code><span class="initializer"> = 0</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$expiry</code><span class="initializer"> = 0</span></span><br>): <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">
   <span class="function"><strong>Memcached::incrementByKey()</strong></span> increments a numeric item&#039;s value
   by the specified <code class="parameter">offset</code>. If the item&#039;s value is not
   numeric, an error will result.
   <span class="function"><strong>Memcached::incrementByKey()</strong></span> will set the item to the
   <code class="parameter">initial_value</code> parameter if the key doesn&#039;t exist.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-memcached.incrementbykey-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">server_key</code></dt>
     <dd>
      <p class="para">
       La chiave che identifica il server su cui salvare il valore. Invece di effettuare li&#039;hashing sulla chiave dell&#039;elemento, si effettua l&#039;hashing della chiave del server al momento di decidere con quale server memcached comunicare. Questo permette di raggruppare gli elementi correlati ad un singolo server ottenendo maggiore efficienza nelle operazioni multiple.
      </p>
     </dd>
    
    
     <dt><code class="parameter">key</code></dt>
     <dd>
      <p class="para">
       The key of the item to increment.
      </p>
     </dd>
    
    
     <dt><code class="parameter">offset</code></dt>
     <dd>
      <p class="para">
       The amount by which to increment the item&#039;s value.
      </p>
     </dd>
    
    
     <dt><code class="parameter">initial_value</code></dt>
     <dd>
      <p class="para">
       The value to set the item to if it doesn&#039;t currently exist.
      </p>
     </dd>
    
    
     <dt><code class="parameter">expiry</code></dt>
     <dd>
      <p class="para">
       The expiry time to set on the item.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-memcached.incrementbykey-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   Returns new item&#039;s value on success o <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> in caso di fallimento.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-memcached.incrementbykey-seealso">
  <h3 class="title">Vedere anche:</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="memcached.decrement.php" class="methodname" rel="rdfs-seeAlso">Memcached::decrement()</a> - Decrement numeric item's value</span></li>
    <li><span class="methodname"><a href="memcached.decrementbykey.php" class="methodname" rel="rdfs-seeAlso">Memcached::decrementByKey()</a> - Decrement numeric item's value, stored on a specific server</span></li>
    <li><span class="methodname"><a href="memcached.increment.php" class="methodname" rel="rdfs-seeAlso">Memcached::increment()</a> - Increment numeric item's value</span></li>
   </ul>
  </p>
 </div>


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