Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/gh_90.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $memcached = memc_get_instance (array (
// Create a key for use as a lock. If this key already exists, wait till it doesn't exist.
{
$key = 'LockKey';
$lockToken = mt_rand(0, pow(2, 32)); //Random value betwen 0 and 2^32 for ownership verification
$lockToken = mt_rand(0, mt_getrandmax()); //Random value for ownership verification

while (true)
{
Expand Down Expand Up @@ -88,4 +88,4 @@ array(10) {
int(1)
["9_%s"]=>
int(1)
}
}
6 changes: 3 additions & 3 deletions tests/incrdecr.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ echo $php_errormsg, "\n";
var_dump($m->get('foo'));

echo "Enormous offset\n";
$m->increment('foo', 4294967296);
$m->increment('foo', 0x7f000000);
var_dump($m->get('foo'));

$m->decrement('foo', 4294967296);
$m->decrement('foo', 0x7f000000);
var_dump($m->get('foo'));

--EXPECT--
Expand All @@ -68,5 +68,5 @@ int(1)
Memcached::decrement(): offset cannot be a negative value
int(1)
Enormous offset
int(4294967297)
int(2130706433)
int(1)
6 changes: 3 additions & 3 deletions tests/incrdecr_bykey.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ echo $php_errormsg, "\n";
var_dump($m->get('foo'));

echo "Enormous offset\n";
$m->incrementByKey('foo', 'foo', 4294967296);
$m->incrementByKey('foo', 'foo', 0x7f000000);
var_dump($m->get('foo'));

$m->decrementByKey('foo', 'foo', 4294967296);
$m->decrementByKey('foo', 'foo', 0x7f000000);
var_dump($m->get('foo'));

--EXPECT--
Expand All @@ -62,5 +62,5 @@ int(1)
Memcached::decrementByKey(): offset cannot be a negative value
int(1)
Enormous offset
int(4294967297)
int(2130706433)
int(1)