How do I convert a 4-byte number to 16 binary?

Source: Internet
Author: User
I only know the Dechex function, but it turns out to be
echo Dechex (1407401322869);

afa7e975

Calculator Select four bytes out of the results 147afa82c60 is the result I want

How do I use PHP to implement?


Reply to discussion (solution)

What kind of calculator are you?
It should be 147afa7e975.

Echo Base_convert (1407401322869, 10, 16); 147afa7e975

There's something wrong with your calculator.

No, moderator, I just didn't test it.
Test it.

Echo Base_convert (1407401322869, 10, 16); Display is CCCDC8F1EA8?

Thank you for helping me.

The problem is wrong, the result should be 147afa7e975
But I used Base_convert to come out and it turned out to be cccdc8f1ea8.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.