Can anyone translate the following function for me into English that I can understand?
Code: Select all
private function _getserver($key)
{
$bucket=((crc32($key)>>16)&0x7fff) % $this->bucketcount;
$tries=$this->bucketcount;
while($tries)
{
$mc=@memcache_connect(get_cfg_var("servername.memcache.ip".($bucket+1)),get_cfg_var("servername.memcache.port".($bucket+1)));
if($mc)
{
return $mc;
}
$bucket=($bucket+1)%$this->bucketcount;
--$tries;
}
return null;
}I am particularly confused by the line:
Code: Select all
$bucket=((crc32($key)>>16)&0x7fff) % $this->bucketcount;