/** * Increments the score of a member from a sorted set by a given amount. * * @param string $key * @param float $value (double) value that will be added to the member's score * @param string $member * * @return float the new value * @link http://redis.io/commands/zincrby * @example * <pre> * $redis->delete('key'); * $redis->zIncrBy('key', 2.5, 'member1'); // key or member1 didn't exist, so member1's score is to 0 * // before the increment and now has the value 2.5 * $redis->zIncrBy('key', 1, 'member1'); // 3.5 * </pre> */ public function zIncrBy($key, $value, $member) { try { return $this->client->zIncrBy($key, $value, $member); } catch (Exception $e) { return $this->handleException($e, __FUNCTION__, func_get_args()); } }
/** * Increments the score of a member from a sorted set by a given amount. * * @param string $key * @param float $value (double) value that will be added to the member's score * @param string $member * * @return float the new value * @link http://redis.io/commands/zincrby * @example * <pre> * $redis->delete('key'); * $redis->zIncrBy('key', 2.5, 'member1'); // key or member1 didn't exist, so member1's score is to 0 * // before the increment and now has the value 2.5 * $redis->zIncrBy('key', 1, 'member1'); // 3.5 * </pre> */ public function zIncrBy($key, $value, $member) { $this->appendToLog('ZINCRBY ' . $key . ' ' . $value . ' ' . $member); return $this->client->zIncrBy($key, $value, $member); }