1

why? I guess is overflow,but i can't fix it.

<?php
/*redis*/
$redis = new Redis();
$redis->connect('127.0.0.1');
$res = $redis->eval('return   32140378*16777216');
var_dump($res);
exit;
//result:1509949440
//right:539226064027648
Shadow
  • 33,525
  • 10
  • 51
  • 64
xiaojiong
  • 21
  • 3
  • 1
    redis 64bit. redis eval is right. phpredis is wrong – xiaojiong Jan 07 '16 at 18:05
  • @RyanVincent https://github.com/owlient/phpredis/pull/111 .php 64bit 5.4 ,redis 3.04, phpredis extend 2.2.7. phpredis library.c reply_info is int change long long int and atoi change atol.I fix it.think you – xiaojiong Jan 08 '16 at 14:13
  • https://github.com/phpredis/phpredis/pull/721 i fix it.think you everyone – xiaojiong Jan 11 '16 at 01:19

1 Answers1

1

I have repaired it myself, for more details: https://github.com/phpredis/phpredis/pull/721

xiaojiong
  • 21
  • 3