From e0b24be1ed1c25e53906c58720677f1f5ce4186c Mon Sep 17 00:00:00 2001 From: michael-grunder Date: Fri, 28 Oct 2022 12:29:33 -0700 Subject: Documentation: Add a BRPOPLPUSH example block [skip ci] --- redis.stub.php | 26 ++++++++++++++++++++++++++ redis_arginfo.h | 2 +- redis_legacy_arginfo.h | 2 +- 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. * + * + * '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" + * // } + * ?> + * */ 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) -- cgit v1.2.3