简体   繁体   English

如何在PHP中将两个无符号的32位整数合并为64位整数?

[英]how to combine two unsigned 32bit integers to 64bit integer in php?

I have two unsigned 32 bit integers that I need to combine to make one long integer or a string it does not matter if it is in string format as long as I have the number. 我有两个无符号的32位整数,我需要将它们组合成一个长整数或一个字符串,只要它具有数字,它是否为字符串格式就没有关系。 for example: 例如:

low: -589298671 低:-589298671

high: 4 高:4

thanks! 谢谢!

I ended up finding a solution in this article . 我最终在本文中找到了解决方案。

it has solved my problem perfectly also will work on any system. 它完美解决了我的问题,也可以在任何系统上运行。 it's a great piece of code. 这是一段很棒的代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM