Home >Backend Development >PHP Tutorial >There is no decrByFloat method in the php redis extension, right?
A question involving a user's balance, the format is 10.00, with two decimal places.
The incrByFloat method is used when increasing
But it doesn’t work when decreasing. Can we only read it first, do subtraction, and then set it?
A question involving a user's balance, the format is 10.00, with two decimal places.
The incrByFloat method is used when increasing
But it doesn’t work when decreasing. Can we only read it first, do subtraction, and then set it?
incrByFloat($key, -10.00);