https://redis.readthedocs.org/en/latest/
https://redis.readthedocs.org/en/latest/sorted_set/zcount.html
zrangebyscore
语法:zrangebyscore key min max [withscores] [limit offset count]
解释:返回有续集key中,score大于等于min并且小于等于max的member。返回结果按照score递增的次序排列。可选withscores决定返回结果集中仅仅返回member还是返回member和score;可选参数limit 指定返回结果的数量区间。
zrevrangebyscore
语法:zrevrangescore key max min [withscores] [limit offset count]
解释:返回有续集key中score<=max并且score>=min 的元素,返回结果根据score从大到小顺序排列。可选参数withscores决定结果集中是否包含score,可选参数limit 指定返回结果集范围。
zremrangebyrank
语法:zremrangebyrank key start stop
解释:移除有续集中指定排名范围【start stop】的元素,返回移除元素个数
zscore
语法:zscore key member
解释:返回有续集key中member的score
$score = $redis->zscore('hwduid',$uid);