sRem 命令/方法/函数

Removes the specified member from the set value stored at key.

移除指定的VALUE从SET容器中


Parameters

key member


Return value

BOOL TRUE if the member was present in the set, FALSE if it didn't.


Example

$redis->sAdd('key1' , 'member1');

$redis->sAdd('key1' , 'member2');

$redis->sAdd('key1' , 'member3'); /* 'key1' => {'member1', 'member2', 'member3'}*/

$redis->sRem('key1', 'member2'); /* 'key1' => {'member1', 'member3'} */