Skip to content

Commit 87f1c39

Browse files
Updates EXISTS documentation and notes change in 4.0.0
1 parent e17e65d commit 87f1c39

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.markdown

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -804,15 +804,21 @@ _**Description**_: Verify if the specified key exists.
804804
*key*
805805

806806
##### *Return value*
807-
*BOOL*: If the key exists, return `TRUE`, otherwise return `FALSE`.
807+
*long*: The number of keys tested that do exist.
808808

809809
##### *Examples*
810810
~~~
811811
$redis->set('key', 'value');
812-
$redis->exists('key'); /* TRUE */
813-
$redis->exists('NonExistingKey'); /* FALSE */
812+
$redis->exists('key'); /* 1 */
813+
$redis->exists('NonExistingKey'); /* 0 */
814+
815+
$redis->mset(['foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz']);
816+
$redis->exists(['foo', 'bar', 'baz]); /* 3 */
817+
$redis->exists('foo', 'bar', 'baz'); /* 3 */
814818
~~~
815819

820+
**Note**: This function took a single argument and returned TRUE or FALSE in phpredis versions < 4.0.0.
821+
816822
### incr, incrBy
817823
-----
818824
_**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.

0 commit comments

Comments
 (0)