The data structure returned by some methods of swoole's Redis class is inconsistent with the format returned by PHP's redis extension.

I originally intended to replace the PHP extended Redis class with swoole"s co-program Redis class, but found that the format of the data returned by the hmget method is different from that returned by the PHP extension Redis class:

for hash data of a key-value, the format returned by swoole redis is

[0 =>key, 1=> value]

format returned by the PHP extension Redis class:

[key => value]

especially the Redis class of swoole also inherits the extended Redis class. Can the format returned by this method be consistent with that returned by the extension class?

Please check other methods to see if they have the same problem.

Jun.19,2022

you can choose to use Runtime instead of Swoole Redis to make ext-redis a collaborative client
https://wiki.swoole.com/wiki/...

.
Menu