Bitwise Shift - Getting different results in C#.net vs PHP
问题 When I run this command in PHP, I get: Code: 2269495617392648 >> 24 Result: 32 When I run it in C#.net or vb.net, I get: Code: 2269495617392648 >> 24 Result: 135272480 PHP is correct. The interesting thing is, that when I try to shift any number greater than int32 in .net, it yields bad results.. Every number under int32 (2147483647) yields the same results from php and c#.net or vb.net Is there a workaround for this in .net? 回答1: Strictly speaking, PHP is wrong. The entire bit pattern of the