converting signed integers to unsigned integer methods in php, PHP integer _php tutorial

Source: Internet
Author: User

converting signed integers to unsigned integer methods in php, PHP integer


In a short address item, the ID of a six-bit short address map becomes a signed integer, based on the six-bit character-to-ID mapping algorithm, when the ID exceeds 2147483647.

Copy the Code code as follows:
ID > Six-bit character > Mapping ID

id:2147483644 > Tfffvq > 2147483644
id:2147483645 > Efffvq > 2147483645
id:2147483646 > Nfffvq > 2147483646
id:2147483647 > Ffffvq > 2147483647
id:2147483648 > Nnnnnu >-2147483648
id:2147483649 > Dnnnnu >-2147483647
id:2147483650 > Rnnnnu >-2147483646

You need to convert signed integers to unsigned integers: (float) sprintf ('%u ', $id)

PHP official website about the integer type information: http://php.net/manual/zh/language.types.integer.php

http://www.bkjia.com/PHPjc/1008024.html www.bkjia.com true http://www.bkjia.com/PHPjc/1008024.html techarticle In PHP, the signed integer is converted to an unsigned integer, the php integer in a short address item, according to the six-bit character and ID of the mutual mapping algorithm, when the ID of more than 2147483647, six ...

  • Related Article

    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.