src/HSPHP/WriteSocket.php
private function genericUpdate($index, $operation, $compare, $keys, $values, $limit = 1, $begin = 0, $in = array())
    {
        $query = $index . self::SEP . $compare . self::SEP . count($keys);
        foreach ($keys as $key) {
            $query .= self::SEP . $this->encodeString((string)$key);
        }
        $query .= self::SEP . $limit . self::SEP . $begin;

        if ($in) {
            $query .= self::SEP . '@' . self::SEP . '0' . self::SEP . count($in);
            foreach($in as $inValue) {
                $query .= self::SEP . $this->encodeString((string)$inValue);
            }
        }

        $query .= self::SEP . $operation;
        foreach ($values as $key) {
            $query .= self::SEP . $this->encodeString((string)$key);
        }
        $this->sendStr($query . self::EOL);
    }
private function genericUpdate($index, $operation, $compare, $keys, $values, $limit = 1, $begin = 0, $in = array())
    {
        $query = $index . self::SEP . $compare . self::SEP . count($keys);
        foreach ($keys as $key) {
            $query .= self::SEP . $this->encodeString((string)$key);
        }
        $query .= self::SEP . $limit . self::SEP . $begin;

        if ($in) {
            $query .= self::SEP . '@' . self::SEP . '0' . self::SEP . count($in);
            foreach($in as $inValue) {
                $query .= self::SEP . $this->encodeString((string)$inValue);
            }
        }

        $query .= self::SEP . $operation;
        foreach ($values as $key) {
            $query .= self::SEP . $this->encodeString((string)$key);
        }
        $this->sendStr($query . self::EOL);
    }
genericUpdate method (used for updates, increment and decrements)

@param integer $index
@param staing  $operation
@param string  $compare
@param array   $keys
@param array   $values
@param integer $limit
@param integer $begin
@param array $in