Project requirements: encode a 64-bit integer into a network byte sequence. I know that pack (& #039; J & #039;, $ bigint) can be used in php5.6.3 and later versions ), but in this case, I have to disagree with the new php version. Now the company uses the php5.4.9 operating system as 64-bit linux. In this case, I would like to ask ,... project requirements: encode a 64-bit integer into a network byte sequence. I know that pack ('J', $ bigint) can be used in php5.6.3 or later versions ), however, I have to disagree with the new php version and O & M personnel. Now the company uses the php5.4.9 operating system as 64-bit linux. In this case, how to convert 64-bit integer codes
Reply content:
Project requirements: encode a 64-bit integer into a network byte sequence. I know that pack ('J', $ bigint) can be used in php5.6.3 or later versions ), however, I have to disagree with the new php version and O & M personnel. Now the company uses the php5.4.9 operating system as 64-bit linux. In this case, how to convert 64-bit integer codes
Pack ("NN", $ big> 32, $ big)
If you do not have built-in support, split it by yourself. It cannot be split into eight 8 bits in the correct order and then converted to bytes one by one.