I have a code that look like this:
echo bin2hex( pack( "L", 1000 ) );
Which prints: e8030000
Now, having only e8030000, how can I reverse it back to the int 1000 ?
UPDATE:
found the answer: unpack( "L", ( pack( "H*", 'e8030000' ) ) );
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Answer:
unpack( "L", ( pack( "H*", 'e8030000' ) ) );