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>2022-10-28 22:29:33 +0300
committerMichael Grunder <michael.grunder@gmail.com>2022-10-29 06:33:10 +0300
commite0b24be1ed1c25e53906c58720677f1f5ce4186c (patch)
tree690bcdc7e9c01a1f5c7ef408766a91865ba5684e
parenta2b0c86f67ec55326733fe6173c2d2010ac3dafc (diff)
Documentation: Add a BRPOPLPUSH example block
[skip ci]
-rw-r--r--redis.stub.php26
-rw-r--r--redis_arginfo.h2
-rw-r--r--redis_legacy_arginfo.h2
3 files changed, 28 insertions, 2 deletions
diff --git a/redis.stub.php b/redis.stub.php
index 42d58abe..b3b3c8e2 100644
--- a/redis.stub.php
+++ b/redis.stub.php
@@ -920,6 +920,32 @@ class Redis {
*
* @return Redis|string|false The popped element or false if the source key was empty.
*
+ * <code>
+ * <?php
+ * $redis = new Redis(['host' => 'localhost']);
+ *
+ * $redis->pipeline()
+ * ->del('list1', 'list2')
+ * ->rpush('list1', 'list1-1', 'list1-2')
+ * ->rpush('list2', 'list2-1', 'list2-2')
+ * ->exec();
+ *
+ * var_dump($redis->rpoplpush('list2', 'list1'));
+ * var_dump($redis->lrange('list1', 0, -1));
+ *
+ * // --- OUTPUT ---
+ * // string(7) "list2-2"
+ * //
+ * // array(3) {
+ * // [0]=>
+ * // string(7) "list2-2"
+ * // [1]=>
+ * // string(7) "list1-1"
+ * // [2]=>
+ * // string(7) "list1-2"
+ * // }
+ * ?>
+ * </code>
*/
public function rpoplpush(string $srckey, string $dstkey): Redis|string|false;
diff --git a/redis_arginfo.h b/redis_arginfo.h
index 7f638a06..f3d0919a 100644
--- a/redis_arginfo.h
+++ b/redis_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 3c2e612a6892a8ae2ac363336c462e24a1333050 */
+ * Stub hash: 63dd54d205675ceed36354c9b880e6afc7a0604e */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Redis___construct, 0, 0, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "null")
diff --git a/redis_legacy_arginfo.h b/redis_legacy_arginfo.h
index d08b9276..7a14f968 100644
--- a/redis_legacy_arginfo.h
+++ b/redis_legacy_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 3c2e612a6892a8ae2ac363336c462e24a1333050 */
+ * Stub hash: 63dd54d205675ceed36354c9b880e6afc7a0604e */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Redis___construct, 0, 0, 0)
ZEND_ARG_INFO(0, options)