May I know how can I do PHP >>> ? Such operators is not available in PHP, but is available in Javascript.
I just managed to discover a function as follow:
Twice as fast for negative numbers as using the decimal-binary conversions
function zerofill($a,$b) { if($a>=0) return $a>>$b; if($b==0) return (($a>>1)&0x7fffffff)*2+(($a>>$b)&1); return ((~$a)>>$b)^(0x7fffffff>>($b-1));