src/BTR/RedisObjects/RedisSortedSet.php
public function add($member, $score, $flag = null, $incr = false)
    {
        $ret = $this->strToVal(
            $this->redis->zadd(
                $this->key,
                [$this->valToStr($member) => $score],
                $flag,
                $flag === self::FLAG_UPDATE,
                $incr
            )
        );
        if ($incr) {
            return $ret;
        }

        return $ret === 1;
    }
public function add($member, $score, $flag = null, $incr = false)
    {
        $ret = $this->strToVal(
            $this->redis->zadd(
                $this->key,
                [$this->valToStr($member) => $score],
                $flag,
                $flag === self::FLAG_UPDATE,
                $incr
            )
        );
        if ($incr) {
            return $ret;
        }

        return $ret === 1;
    }
@link https://redis.io/commands/zadd

@param string|int  $member Member to add or update.
@param float|int   $score  Associated score to member.
@param null|string $flag   See self::FLAG_* for possible flags. (ADD, UPDATE)
@param bool        $incr   True will make add() behave like increment($member, $score).

@return number|string|bool Bool on setting or updating to report the success or the resulting value when using
$incr.