Home > Backend Development > PHP Tutorial > 32位系统左移溢出,64位系统不溢出,会否在64位系统 保留32左溢的结果

32位系统左移溢出,64位系统不溢出,会否在64位系统 保留32左溢的结果

WBOY
Release: 2016-06-13 12:08:51
Original
1000 people have browsed it

32位系统左移溢出,64位系统不溢出,能否在64位系统 保留32左溢的结果

<br />echo 83661<<15;<br />//32系统结果:-1553563648<br />
Copy after login


<br />echo 83661<<15;<br />//64系统结果:2741403648<br />
Copy after login


想在64位系统 中 保留 32的溢出结果,请问怎么弄,小弟想不明白,请教各位大大。
------解决思路----------------------
echo  2741403648 - 0x100000000;<br />
Copy after login
-1553563648

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template