ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## sPop ##### *Description* Removes and returns a random element from the set value at Key. 随机返回一个元素,并且在SET容器中移除该元素。 ##### *Parameters* *key* ##### *Return value* *String* "popped" value *Bool*`<span class="calibre12">FALSE</span>` if set identified by key is empty or doesn't exist. ##### *Example* ``` <pre class="calibre9">$redis->sAdd('key1' , 'member1'); $redis->sAdd('key1' , 'member2'); $redis->sAdd('key1' , 'member3'); /* 'key1' => {'member3', 'member1', 'member2'}*/ $redis->sPop('key1'); /* 'member1', 'key1' => {'member3', 'member2'} */ $redis->sPop('key1'); /* 'member3', 'key1' => {'member2'} */ ``` ##