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:
authormichael-grunder <michael.grunder@gmail.com>2018-03-31 21:31:41 +0300
committermichael-grunder <michael.grunder@gmail.com>2018-03-31 21:31:41 +0300
commit87f1c3920502a529d088b38c1a5fb5ade74cd64e (patch)
tree4235d804855ef97de14c9ee7cb70822392b00f8f /README.markdown
parente17e65d531a2fd4b2315d657c591e4bb26e6437c (diff)
Updates EXISTS documentation and notes change in 4.0.0
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown12
1 files changed, 9 insertions, 3 deletions
diff --git a/README.markdown b/README.markdown
index a3d95416..460f9104 100644
--- a/README.markdown
+++ b/README.markdown
@@ -804,15 +804,21 @@ _**Description**_: Verify if the specified key exists.
*key*
##### *Return value*
-*BOOL*: If the key exists, return `TRUE`, otherwise return `FALSE`.
+*long*: The number of keys tested that do exist.
##### *Examples*
~~~
$redis->set('key', 'value');
-$redis->exists('key'); /* TRUE */
-$redis->exists('NonExistingKey'); /* FALSE */
+$redis->exists('key'); /* 1 */
+$redis->exists('NonExistingKey'); /* 0 */
+
+$redis->mset(['foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz']);
+$redis->exists(['foo', 'bar', 'baz]); /* 3 */
+$redis->exists('foo', 'bar', 'baz'); /* 3 */
~~~
+**Note**: This function took a single argument and returned TRUE or FALSE in phpredis versions < 4.0.0.
+
### incr, incrBy
-----
_**Description**_: Increment the number stored at key by one. If the second argument is filled, it will be used as the integer value of the increment.