Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 9149

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Predefined Constants</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="memcached.resources.html">Resource Types</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="memcached.expiration.html">Expiration Times</a></div>
 <div class="up"><a href="book.memcached.html">Memcached</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="memcached.constants" class="appendix">
 <h1>Predefined Constants</h1>

 <p class="simpara">
The constants below are defined by this extension, and
will only be available when the extension has either
been compiled into PHP or dynamically loaded at runtime.
</p>
 <dl>


  <dt id="memcached.constants.opt-compression">
   <span class="term"><strong><code>Memcached::OPT_COMPRESSION</code></strong></span>
   <dd>

    <p class="para">Enables or disables payload compression. When enabled,
     item values longer than a certain threshold (currently 100 bytes) will be
     compressed during storage and decompressed during retrieval
     transparently.</p>
    <p class="para">Type: <em>boolean</em>, default: <strong><code>TRUE</code></strong>.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.opt-serializer">
   <span class="term"><strong><code>Memcached::OPT_SERIALIZER</code></strong></span>
   <dd>

    <p class="para">
     Specifies the serializer to use for serializing non-scalar values.
     The valid serializers are <strong><code>Memcached::SERIALIZER_PHP</code></strong>
     or <strong><code>Memcached::SERIALIZER_IGBINARY</code></strong>. The latter is
     supported only when memcached is configured with
     <em>--enable-memcached-igbinary</em> option and the
     <em>igbinary</em> extension is loaded.
    </p>
    <p class="para">Type: <em>integer</em>, default: <strong><code>Memcached::SERIALIZER_PHP</code></strong>.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.serializer-php">
   <span class="term"><strong><code>Memcached::SERIALIZER_PHP</code></strong></span>
   <dd>

    <p class="para">The default PHP serializer.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.serializer-igbinary">
   <span class="term"><strong><code>Memcached::SERIALIZER_IGBINARY</code></strong></span>
   <dd>

    <p class="para">The <a href="https://github.com/igbinary/igbinary" class="link external">&raquo;&nbsp;igbinary</a> serializer.
     Instead of textual representation it stores PHP data structures in a
     compact binary form, resulting in space and time gains.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.serializer-json">
   <span class="term"><strong><code>Memcached::SERIALIZER_JSON</code></strong></span>
   <dd>

    <p class="para">The JSON serializer. Requires PHP 5.2.10+.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.opt-prefix-key">
   <span class="term"><strong><code>Memcached::OPT_PREFIX_KEY</code></strong></span>
   <dd>

    <p class="para">This can be used to create a &quot;domain&quot; for your item keys. The value
     specified here will be prefixed to each of the keys. It cannot be
     longer than <em>128</em> characters and will reduce the
     maximum available key size. The prefix is applied only to the item keys,
     not to the server keys.</p>
    <p class="para">Type: <em>string</em>, default: <em>&quot;&quot;</em>.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.opt-hash">
   <span class="term"><strong><code>Memcached::OPT_HASH</code></strong></span>
   <dd>

    <p class="para">Specifies the hashing algorithm used for the item keys. The valid
     values are supplied via <strong><code>Memcached::HASH_*</code></strong> constants.
     Each hash algorithm has its advantages and its disadvantages. Go with the
     default if you don&#039;t know or don&#039;t care.</p>
    <p class="para">Type: <em>integer</em>, default: <strong><code>Memcached::HASH_DEFAULT</code></strong></p>
   </dd>

  </dt>


  <dt id="memcached.constants.hash-default">
   <span class="term"><strong><code>Memcached::HASH_DEFAULT</code></strong></span>
   <dd>

    <p class="para">The default (Jenkins one-at-a-time) item key hashing algorithm.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.hash-md5">
   <span class="term"><strong><code>Memcached::HASH_MD5</code></strong></span>
   <dd>

    <p class="para">MD5 item key hashing algorithm.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.hash-crc">
   <span class="term"><strong><code>Memcached::HASH_CRC</code></strong></span>
   <dd>

    <p class="para">CRC item key hashing algorithm.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.hash-fnv1-64">
   <span class="term"><strong><code>Memcached::HASH_FNV1_64</code></strong></span>
   <dd>

    <p class="para">FNV1_64 item key hashing algorithm.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.hash-fnv1a-64">
   <span class="term"><strong><code>Memcached::HASH_FNV1A_64</code></strong></span>
   <dd>

    <p class="para">FNV1_64A item key hashing algorithm.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.hash-fnv1-32">
   <span class="term"><strong><code>Memcached::HASH_FNV1_32</code></strong></span>
   <dd>

    <p class="para">FNV1_32 item key hashing algorithm.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.hash-fnv1a-32">
   <span class="term"><strong><code>Memcached::HASH_FNV1A_32</code></strong></span>
   <dd>

    <p class="para">FNV1_32A item key hashing algorithm.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.hash-hsieh">
   <span class="term"><strong><code>Memcached::HASH_HSIEH</code></strong></span>
   <dd>

    <p class="para">Hsieh item key hashing algorithm.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.hash-murmur">
   <span class="term"><strong><code>Memcached::HASH_MURMUR</code></strong></span>
   <dd>

    <p class="para">Murmur item key hashing algorithm.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.opt-distribution">
   <span class="term"><strong><code>Memcached::OPT_DISTRIBUTION</code></strong></span>
   <dd>

    <p class="para">Specifies the method of distributing item keys to the servers.
     Currently supported methods are modulo and consistent hashing. Consistent
     hashing delivers better distribution and allows servers to be added to
     the cluster with minimal cache losses.</p>
    <p class="para">Type: <em>integer</em>, default: <strong><code>Memcached::DISTRIBUTION_MODULA.</code></strong></p>
   </dd>

  </dt>


  <dt id="memcached.constants.distribution-modula">
   <span class="term"><strong><code>Memcached::DISTRIBUTION_MODULA</code></strong></span>
   <dd>

    <p class="para">Modulo-based key distribution algorithm.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.distribution-consistent">
   <span class="term"><strong><code>Memcached::DISTRIBUTION_CONSISTENT</code></strong></span>
   <dd>

    <p class="para">Consistent hashing key distribution algorithm (based on libketama).</p>
   </dd>

  </dt>


  <dt id="memcached.constants.opt-libketama-compatible">
   <span class="term"><strong><code>Memcached::OPT_LIBKETAMA_COMPATIBLE</code></strong></span>
   <dd>

    <p class="para">Enables or disables compatibility with libketama-like behavior. When
     enabled, the item key hashing algorithm is set to MD5 and distribution is
     set to be weighted consistent hashing distribution. This is useful
     because other libketama-based clients (Python, Ruby, etc.) with the same
     server configuration will be able to access the keys transparently.
    </p>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <p class="para">
      It is highly recommended to enable this option if you want to use
     consistent hashing, and it may be enabled by default in future
     releases.
     </p>
    </p></blockquote>
    <p class="para">Type: <em>boolean</em>, default: <strong><code>FALSE</code></strong>.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.opt-buffer-writes">
   <span class="term"><strong><code>Memcached::OPT_BUFFER_WRITES</code></strong></span>
   <dd>

    <p class="para">Enables or disables buffered I/O. Enabling buffered I/O causes
     storage commands to &quot;buffer&quot; instead of being sent. Any action that
     retrieves data causes this buffer to be sent to the remote connection.
     Quitting the connection or closing down the connection will also cause
     the buffered data to be pushed to the remote connection.</p>
    <p class="para">Type: <em>boolean</em>, default: <strong><code>FALSE</code></strong>.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.opt-binary-protocol">
   <span class="term"><strong><code>Memcached::OPT_BINARY_PROTOCOL</code></strong></span>
   <dd>

    <p class="para">Enable the use of the binary protocol. Please note that you cannot
     toggle this option on an open connection.</p>
    <p class="para">Type: <em>boolean</em>, default: <strong><code>FALSE</code></strong>.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.opt-no-block">
   <span class="term"><strong><code>Memcached::OPT_NO_BLOCK</code></strong></span>
   <dd>

    <p class="para">Enables or disables asynchronous I/O. This is the fastest transport
     available for storage functions.</p>
    <p class="para">Type: <em>boolean</em>, default: <strong><code>FALSE</code></strong>.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.opt-tcp-nodelay">
   <span class="term"><strong><code>Memcached::OPT_TCP_NODELAY</code></strong></span>
   <dd>

    <p class="para">Enables or disables the no-delay feature for connecting sockets (may
     be faster in some environments).</p>
    <p class="para">Type: <em>boolean</em>, default: <strong><code>FALSE</code></strong>.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.opt-socket-send-size">
   <span class="term"><strong><code>Memcached::OPT_SOCKET_SEND_SIZE</code></strong></span>
   <dd>

    <p class="para">The maximum socket send buffer in bytes.</p>
    <p class="para">Type: <em>integer</em>, default: varies by platform/kernel
     configuration.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.opt-socket-recv-size">
   <span class="term"><strong><code>Memcached::OPT_SOCKET_RECV_SIZE</code></strong></span>
   <dd>

    <p class="para">The maximum socket receive buffer in bytes.</p>
    <p class="para">Type: <em>integer</em>, default: varies by platform/kernel
     configuration.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.opt-connect-timeout">
   <span class="term"><strong><code>Memcached::OPT_CONNECT_TIMEOUT</code></strong></span>
   <dd>

    <p class="para">In non-blocking mode this set the value of the timeout during socket
     connection, in milliseconds.</p>
    <p class="para">Type: <em>integer</em>, default: <em>1000</em>.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.opt-retry-timeout">
   <span class="term"><strong><code>Memcached::OPT_RETRY_TIMEOUT</code></strong></span>
   <dd>

    <p class="para">The amount of time, in seconds, to wait until retrying a failed
     connection attempt.</p>
    <p class="para">Type: <em>integer</em>, default: <em>0</em>.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.opt-send-timeout">
   <span class="term"><strong><code>Memcached::OPT_SEND_TIMEOUT</code></strong></span>
   <dd>

    <p class="para">Socket sending timeout, in microseconds. In cases where you cannot
     use non-blocking I/O this will allow you to still have timeouts on the
     sending of data.</p>
    <p class="para">Type: <em>integer</em>, default: <em>0</em>.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.opt-recv-timeout">
   <span class="term"><strong><code>Memcached::OPT_RECV_TIMEOUT</code></strong></span>
   <dd>

    <p class="para">Socket reading timeout, in microseconds. In cases where you cannot
     use non-blocking I/O this will allow you to still have timeouts on the
     reading of data.</p>
    <p class="para">Type: <em>integer</em>, default: <em>0</em>.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.opt-poll-timeout">
   <span class="term"><strong><code>Memcached::OPT_POLL_TIMEOUT</code></strong></span>
   <dd>

    <p class="para">Timeout for connection polling, in milliseconds.</p>
    <p class="para">Type: <em>integer</em>, default: <em>1000</em>.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.opt-cache-lookups">
   <span class="term"><strong><code>Memcached::OPT_CACHE_LOOKUPS</code></strong></span>
   <dd>

    <p class="para">Enables or disables caching of DNS lookups.</p>
    <p class="para">Type: <em>boolean</em>, default: <strong><code>FALSE</code></strong>.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.opt-server-failure-limit">
   <span class="term"><strong><code>Memcached::OPT_SERVER_FAILURE_LIMIT</code></strong></span>
   <dd>

    <p class="para">Specifies the failure limit for server connection attempts. The
     server will be removed after this many continuous connection
     failures.</p>
    <p class="para">Type: <em>integer</em>, default: <em>0</em>.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.have-igbinary">
   <span class="term"><strong><code>Memcached::HAVE_IGBINARY</code></strong></span>
   <dd>

    <p class="para">Indicates whether igbinary serializer support is available.</p>
    <p class="para">Type: <em>boolean</em>.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.have-json">
   <span class="term"><strong><code>Memcached::HAVE_JSON</code></strong></span>
   <dd>

    <p class="para">Indicates whether JSON serializer support is available.</p>
    <p class="para">Type: <em>boolean</em>.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.get-preserve-order">
   <span class="term"><strong><code>Memcached::GET_PRESERVE_ORDER</code></strong></span>
   <dd>

    <p class="para">A flag for  <span class="function"><a href="memcached.getmulti.html" class="function">Memcached::getMulti()</a></span> and
      <span class="function"><a href="memcached.getmultibykey.html" class="function">Memcached::getMultiByKey()</a></span> to ensure that the keys are
     returned in the same order as they were requested in. Non-existing keys
     get a default value of NULL.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.res-success">
   <span class="term"><strong><code>Memcached::RES_SUCCESS</code></strong></span>
   <dd>

    <p class="para">The operation was successful.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.res-failure">
   <span class="term"><strong><code>Memcached::RES_FAILURE</code></strong></span>
   <dd>

    <p class="para">The operation failed in some fashion.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.res-host-lookup-failure">
   <span class="term"><strong><code>Memcached::RES_HOST_LOOKUP_FAILURE</code></strong></span>
   <dd>

    <p class="para">DNS lookup failed.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.res-unknown-read-failure">
   <span class="term"><strong><code>Memcached::RES_UNKNOWN_READ_FAILURE</code></strong></span>
   <dd>

    <p class="para">Failed to read network data.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.res-protocol-error">
   <span class="term"><strong><code>Memcached::RES_PROTOCOL_ERROR</code></strong></span>
   <dd>

    <p class="para">Bad command in memcached protocol.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.res-client-error">
   <span class="term"><strong><code>Memcached::RES_CLIENT_ERROR</code></strong></span>
   <dd>

    <p class="para">Error on the client side.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.res-server-error">
   <span class="term"><strong><code>Memcached::RES_SERVER_ERROR</code></strong></span>
   <dd>

    <p class="para">Error on the server side.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.res-write-failure">
   <span class="term"><strong><code>Memcached::RES_WRITE_FAILURE</code></strong></span>
   <dd>

    <p class="para">Failed to write network data.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.res-data-exists">
   <span class="term"><strong><code>Memcached::RES_DATA_EXISTS</code></strong></span>
   <dd>

    <p class="para">Failed to do compare-and-swap: item you are trying to store has been
     modified since you last fetched it.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.res-notstored">
   <span class="term"><strong><code>Memcached::RES_NOTSTORED</code></strong></span>
   <dd>

    <p class="para">Item was not stored: but not because of an error. This normally
     means that either the condition for an &quot;add&quot; or a &quot;replace&quot; command
     wasn&#039;t met, or that the item is in a delete queue.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.res-notfound">
   <span class="term"><strong><code>Memcached::RES_NOTFOUND</code></strong></span>
   <dd>

    <p class="para">Item with this key was not found (with &quot;get&quot; operation or &quot;cas&quot;
     operations).</p>
   </dd>

  </dt>


  <dt id="memcached.constants.res-partial-read">
   <span class="term"><strong><code>Memcached::RES_PARTIAL_READ</code></strong></span>
   <dd>

    <p class="para">Partial network data read error.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.res-some-errors">
   <span class="term"><strong><code>Memcached::RES_SOME_ERRORS</code></strong></span>
   <dd>

    <p class="para">Some errors occurred during multi-get.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.res-no-servers">
   <span class="term"><strong><code>Memcached::RES_NO_SERVERS</code></strong></span>
   <dd>

    <p class="para">Server list is empty.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.res-end">
   <span class="term"><strong><code>Memcached::RES_END</code></strong></span>
   <dd>

    <p class="para">End of result set.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.res-errno">
   <span class="term"><strong><code>Memcached::RES_ERRNO</code></strong></span>
   <dd>

    <p class="para">System error.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.res-buffered">
   <span class="term"><strong><code>Memcached::RES_BUFFERED</code></strong></span>
   <dd>

    <p class="para">The operation was buffered.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.res-timeout">
   <span class="term"><strong><code>Memcached::RES_TIMEOUT</code></strong></span>
   <dd>

    <p class="para">The operation timed out.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.res-bad-key-provided">
   <span class="term"><strong><code>Memcached::RES_BAD_KEY_PROVIDED</code></strong></span>
   <dd>

    <p class="para">Bad key.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.res-connection-socket-create-failure">
   <span class="term"><strong><code>Memcached::RES_CONNECTION_SOCKET_CREATE_FAILURE</code></strong></span>
   <dd>

    <p class="para">Failed to create network socket.</p>
   </dd>

  </dt>


  <dt id="memcached.constants.res-payload-failure">
   <span class="term"><strong><code>Memcached::RES_PAYLOAD_FAILURE</code></strong></span>
   <dd>

    <p class="para">Payload failure: could not compress/decompress or serialize/unserialize the value.</p>
   </dd>

  </dt>


 </dl>

</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="memcached.resources.html">Resource Types</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="memcached.expiration.html">Expiration Times</a></div>
 <div class="up"><a href="book.memcached.html">Memcached</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>