nicolasff/phpredis — Issue #78: lost return value when using multi to do zscore
Author: RobChen
Created: 2011-11-09 03:46:35+00:00
State: open

first lets c whats in redis server:

redis 127.0.0.1:6379> zrange test 0 -1
1) "1"
2) "2"
3) "3"
4) "4"
5) "5"

and then i did:
redis 127.0.0.1:6379> MULTI
OK
redis 127.0.0.1:6379> zscore test 1
QUEUED
redis 127.0.0.1:6379> zscore test 6
QUEUED
redis 127.0.0.1:6379> zscore test 8
QUEUED
redis 127.0.0.1:6379> zscore test 2
QUEUED

the return value is:
redis 127.0.0.1:6379> EXEC
1) "1"
2) (nil)
3) (nil)
4) "2"

but if i did it in php:
code like:
connect('127.0.0.1', 6379);
$redis->multi();
$redis->zscore('test', 1);
$redis->zscore('test', 6);
$redis->zscore('test', 8);
$redis->zscore('test', 2);
$result = $redis->exec();
print_r($result);
exit;

the return value is:
[root@localhost wwwroot]# php redis.php
Array
(
[0] => 1
[1] => 2
)

what i expect is as same as redis server:
Array
(
[0] => 1
[1] => false
[2] => false
[3] => 2
)

could u pls fix it?