Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Luna Rojas <roberto.luna.rojas@gmail.com>2019-10-23 05:37:03 +0300
committerRoberto Luna Rojas <roberto.luna.rojas@gmail.com>2019-10-23 05:37:03 +0300
commit96a0f0c3433f600ce7ea700d7e41a16f346e7c34 (patch)
tree4b08d23ae015dc13ba11fb044672c5ac40277fe6 /README.markdown
parent75a6f3fa979a36b05890c0ec7db2304d965f4d39 (diff)
HyperLogLogs - pfCount
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown22
1 files changed, 22 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown
index d4d9cbc2..f6550b81 100644
--- a/README.markdown
+++ b/README.markdown
@@ -3138,6 +3138,28 @@ $redis->pfAdd('hll', ['a', 'b', 'c']);
### pfCount
-----
+##### *Prototype*
+~~~php
+$redis->pfCount($key);
+$redis->pfCount(Array $keys);
+~~~
+
+_**Description**_: Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s).
+
+##### *Return value*
+*Integer*: The approximated number of unique elements observed via [pfAdd](#pfAdd).
+
+##### *Example*
+~~~php
+$redis->pfAdd('hll1', ['a', 'b', 'c']); // (int) 1
+$redis->pfCount('hll1'); // (int) 3
+
+$redis->pfAdd('hll2', ['d', 'e', 'a']); // (int) 1
+$redis->pfCount('hll2'); // (int) 3
+
+$redis->pfCount(['hll1', 'hll2']); // (int) 5
+~~~
+
### pfMerge
-----