Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 05f9666

Browse files
author
Nasreddine Bouafif
committed
documentation: sSize example
1 parent 617d098 commit 05f9666

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.markdown

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,13 @@ Return the cardinality of the set identified by key.
427427
##### *Return value*
428428
*LONG* the cardinality of the set identified by key, 0 if set didn't exist.
429429
##### *Example*
430+
<pre>
431+
$redis->sadd('key1' , 'set1');
432+
$redis->sadd('key1' , 'set2');
433+
$redis->sadd('key1' , 'set3'); /* 'key1' => {'set1', 'set2', 'set3'}*/
434+
$redis->sSize('key1'); /* 3 */
435+
$redis->sSize('keyX'); /* 0 */
436+
</pre>
430437

431438
## spop
432439
##### *Description*

0 commit comments

Comments
 (0)