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:
authorNicolas Favre-Felix <n.favrefelix@gmail.com>2010-05-27 12:03:32 +0400
committerNicolas Favre-Felix <n.favrefelix@gmail.com>2010-05-27 12:03:32 +0400
commitc6a510af7c49fe820c8a4b30e3ad5e85703a7b5d (patch)
tree02a8c9621d9f2f87d8c49b419de1cf2c673e299d /README.markdown
parent2fd9cc5b654346ac67a72da08f406b7d09c8f615 (diff)
Fixed documentation for LPUSH, RPUSH.
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown20
1 files changed, 12 insertions, 8 deletions
diff --git a/README.markdown b/README.markdown
index 155de9af..479372c4 100644
--- a/README.markdown
+++ b/README.markdown
@@ -196,12 +196,14 @@ Adds the string value to the head (left) of the list. Creates the list if the ke
*key*
*value* String, value to push in key
##### Return value
-*BOOL* `TRUE` in case of success, `FALSE` in case of Failure.
+*LONG* The new length of the list in case of success, `FALSE` in case of Failure.
##### Examples
<pre>
-$redis->lPush('key1', 'C');
-$redis->lPush('key1', 'B');
-$redis->lPush('key1', 'A'); /* key1 => [ 'A', 'B', 'C' ] */
+$redis->delete('key1');
+$redis->lPush('key1', 'C'); // returns 1
+$redis->lPush('key1', 'B'); // returns 2
+$redis->lPush('key1', 'A'); // returns 3
+/* key1 now points to the following list: [ 'A', 'B', 'C' ] */
</pre>
## rPush
@@ -211,12 +213,14 @@ Adds the string value to the tail (right) of the list. Creates the list if the k
*key*
*value* String, value to push in key
##### Return value
-*BOOL* `TRUE` in case of success, `FALSE` in case of Failure.
+*LONG* The new length of the list in case of success, `FALSE` in case of Failure.
##### Examples
<pre>
-$redis->rPush('key1', 'A');
-$redis->rPush('key1', 'B');
-$redis->rPush('key1', 'C'); /* key1 => [ 'A', 'B', 'C' ] */
+$redis->delete('key1');
+$redis->rPush('key1', 'A'); // returns 1
+$redis->rPush('key1', 'B'); // returns 2
+$redis->rPush('key1', 'C'); // returns 3
+/* key1 now points to the following list: [ 'A', 'B', 'C' ] */
</pre>
## lPop