Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: PHP 右移
有什么能力在 php中获得与(>>> ) 相同的 javascript 的三倍结果?
function urshift($n, $s) { return ($n >= 0) ? ($n >> $s) : (($n & 0x7fffffff) >> $s) | (0x40000000 >> ($s - 1)); }
未经测试,信用在这里。