You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Note:**`zInter` is an alias for `zinterstore` and will be removed in future versions of phpredis.
2818
2819
2820
+
### zPop
2821
+
-----
2822
+
_**Description**_: Can pop the highest or lowest scoring members from one ZSETs. There are two commands (`ZPOPMIN` and `ZPOPMAX` for popping the lowest and highest scoring elements respectively.)
2823
+
2824
+
##### *Prototype*
2825
+
~~~php
2826
+
$redis->zPopMin(string $key, int $count): array
2827
+
$redis->zPopMax(string $key, int $count): array
2828
+
2829
+
$redis->zPopMin(string $key, int $count): array
2830
+
$redis->zPopMax(string $key, int $count): array
2831
+
~~~
2832
+
2833
+
##### *Return value*
2834
+
*ARRAY:* Either an array with the key member and score of the higest or lowest element or an empty array if there is no element available.
2835
+
2836
+
##### *Example*
2837
+
~~~php
2838
+
/* Wait up to 5 seconds to pop the *lowest* scoring member from sets `zs1` and `zs2`. */
2839
+
$redis->bzPopMin(['zs1', 'zs2'], 5);
2840
+
$redis->bzPopMin('zs1', 'zs2', 5);
2841
+
2842
+
/* Wait up to 5 seconds to pop the *highest* scoring member from sets `zs1` and `zs2` */
2843
+
$redis->bzPopMax(['zs1', 'zs2'], 5);
2844
+
$redis->bzPopMax('zs1', 'zs2', 5);
2845
+
~~~
2846
+
2819
2847
### zRange
2820
2848
-----
2821
2849
_**Description**_: Returns a range of elements from the ordered set stored at the specified key, with values in the range [start, end].
0 commit comments