How to use the extension if functions return instance of "Redis" instead of data? #2447
-
As i see in the official stubs almost every function returns what it is supposed to, OR it returns "Redis". What? How do we interpret that result? Please give me example, in the whole README of the project i was not able to find a mention of this. Even the docs seem wrong, for sMembers (and many others) they say
"Redis" is not mentioned. Why i ask this? It broke my prod, because sMembers returned "Redis" instead of an array, now i want to fix the code but i have no idea how to go about it. The thing is, the redis connection works (it is a long-running 7 months cli php script that uses this single connection), everything works (get/set) - its just the sMembers function that started returning "Redis" after these 7 months. So, how should i interpret when functions return "Redis" instead of actual data, do i interpret it like a connection gone bad (even though the connection actually works fine..)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
PhpRedis returns Redis object when it is in multi/pipeline mode. Here is an example how to use it |
Beta Was this translation helpful? Give feedback.
PhpRedis returns Redis object when it is in multi/pipeline mode. Here is an example how to use it
https://github.com/phpredis/phpredis?tab=readme-ov-file#example-115