static inline ulong zend_inline_hash_func(char *arKey, uint nKeyLength)
{
    register ulong hash = 5381;
 
    /* variant with the hash unrolled eight times */
    for (; nKeyLength >= 8; nKeyLength -= 8 {
        hash = ((hash << 5) + hash) + *arKey++;
        hash = ((hash << 5) + hash) + *arKey++;
        hash = ((hash << 5) + hash) + *arKey++;
        hash = ((hash << 5) + hash) + *arKey++;
        hash = ((hash << 5) + hash) + *arKey++;
        hash = ((hash << 5) + hash) + *arKey++;
        hash = ((hash << 5) + hash) + *arKey++;
        hash = ((hash << 5) + hash) + *arKey++;
    }
    switch (nKeyLength) {
        case 7: hash = ((hash << 5) + hash) + *arKey++; /* fallthrough... */
        case 6: hash = ((hash << 5) + hash) + *arKey++; /* fallthrough... */
        case 5: hash = ((hash << 5) + hash) + *arKey++; /* fallthrough... */
        case 4: hash = ((hash << 5) + hash) + *arKey++; /* fallthrough... */
        case 3: hash = ((hash << 5) + hash) + *arKey++; /* fallthrough... */
        case 2: hash = ((hash << 5) + hash) + *arKey++; /* fallthrough... */
        case 1: hash = ((hash << 5) + hash) + *arKey++; break;
        case 0: break;
EMPTY_SWITCH_DEFAULT_CASE()
    }
    return hash;
}

解决方案 »

  1.   

    是位移php移位运算  lz 参考:http://apps.hi.baidu.com/share/detail/23928402
      

  2.   


    $a & $b And(按位与) 将把 $a 和 $b 中都为 1 的位设为 1。
    $a | $b Or(按位或) 将把 $a 或者 $b 中为 1 的位设为 1。
    $a ^ $b Xor(按位异或) 将把 $a 和 $b 中不同的位设为 1。
    ~ $a Not(按位非) 将 $a 中为 0 的位设为 1,反之亦然。
    $a << $b Shift left(左移) 将 $a 中的位向左移动 $b 次(每一次移动都表示“乘以 2”)。
    $a >> $b Shift right(右移) 将 $a 中的位向右移动 $b 次(每一次移动都表示“除以 2”)。优先级如下非结合 clone new clone 和 new
    左 [ array()
    非结合 ++ -- 递增/递减运算符
    非结合 ~ - (int) (float) (string) (array) (object) (bool) @ 类型
    非结合 instanceof 类型
    右结合 ! 逻辑操作符
    左 * / % 算术运算符
    左 + - . 算术运算符和字符串运算符
    左 << >> 位运算符
    非结合 < <= > >= <> 比较运算符
    非结合 == != === !== 比较运算符
    左 & 位运算符和引用
    左 ^ 位运算符
    左 | 位运算符