hIncrByFloat

PHP Redis

hIncrByFloat

Description

Increments the value of a hash member by the provided float value

根据HASH表的KEY,为KEY对应的VALUE自增参数VALUE。浮点型
Parameters

key
member
value: (float) value that will be added to the member's value

Return value

FLOAT the new value

Examples
$redis->delete('h');
$redis->hIncrByFloat('h','x', 1.5); /* returns 1.5: h[x] = 1.5 now */
$redis->hIncrByFLoat('h', 'x', 1.5); /* returns 3.0: h[x] = 3.0 now */
$redis->hIncrByFloat('h', 'x', -3.0); /* returns 0.0: h[x] = 0.0 now */