src/Memcached.php
/**
     * Increments the value of the given key.
     *
     * @param string $key The key to increment.
     *
     * @return int|bool Returns the new item's value on success or FALSE on failure.
     */
Increments the value of the given key.
@param string $key The key to increment.

@return int|bool Returns the new item's value on success or FALSE on failure.
Increments the value of the given key . @param string $key The key to increment . @return int|bool Returns the new item ' s value on success or FALSE on failure .
public function increment($key)
    {
        $counter = $this->adapter->get($key);
        if (false === $counter) {
            $counter = 1;
            $this->adapter->set($key, $counter);
        } else {
            $counter = $this->adapter->increment($key);
        }
        return $counter;
    }
public function increment ( $ key ) { $ counter = $ this -> adapter -> get ( $ key ) ; if ( false === $ counter ) { $ counter = 1 ; $ this -> adapter -> set ( $ key , $ counter ) ; } else { $ counter = $ this -> adapter -> increment ( $ key ) ; } return $ counter ; }
Increments the value of the given key.
Increments the value of the given key .
// if (true === \Memcached::OPT_BINARY_PROTOCOL) { //     // Increment will initialize the value (if not available) //     // only when OPT_BINARY_PROTOCOL is set to true! //     return $this->adapter->increment($key, 1); // }