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.
在mysql中:
select CAST(17640478426339470149 as SIGNED INTEGER); #-806265647370081467
在 php 中:
echo sprintf("%d", 17640478426339470149); #-806265647370082304
我将如何获得相同的签名 int ?(以及为什么会出现这种差异?)
我找到了解决方案,我不确定它是否是最佳解决方案,但至少它有效。
echo gmp_strval(gmp_com(gmp_xor('17640478426339470149', '0xffffffffffffffff'))); #-806265647370081467