开发者

How to reverse this php code "pack("L", 1000);"?

开发者 https://www.devze.com 2023-03-16 20:10 出处:网络
I have a code that look like this: echo bin2hex( pack( \"L\", 1000 ) ); Which prints: e8030000 Now, ha开发者_开发技巧ving only e8030000, how can I reverse it back to the int 1000 ?

I have a code that look like this:

echo bin2hex( pack( "L", 1000 ) );

Which prints: e8030000

Now, ha开发者_开发技巧ving only e8030000, how can I reverse it back to the int 1000 ?

UPDATE:

found the answer: unpack( "L", ( pack( "H*", 'e8030000' ) ) );


Answer: unpack( "L", ( pack( "H*", 'e8030000' ) ) );

0

精彩评论

暂无评论...
验证码 换一张
取 消