note 91892 modified in function.memcache-increment by danbrown
| From: | danbrown@php.net | Date: | Sat, 19 Jun 2010 14:31:39 +0000 |
| Subject: | note 91892 modified in function.memcache-increment by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-170304@lists.php.net to get a copy of this message | ||
Be careful to use Memcache::decrement() and never Memcache::increment() with a negative value.
The check that prevents Memcache::decrement() from going negative is not in place with
Memcache::increment(), so you can end up with a garbage integer on the order of 18 quintillion
stored in place of the expected value.
--was--
Be careful to use Memcache::decrement() and never Memcache::increment() with a negative value.
The check that prevents Memcache::decrement() from going negative is not in place with
Memcache::increment(), so you can end up with a garbage integer on the order of 18 quintillion
stored in place of the expected value.
http://php.net/manual/en/function.memcache-increment.php