Home > Article > Backend Development > Method to convert signed integer to unsigned integer in PHP, php integer_PHP tutorial
In a short address project, based on the mutual mapping between six characters and ID Algorithm, when the ID exceeds 2147483647, the ID mapped by the six-character short address becomes a signed integer.
Copy code The code is as follows:
ID
ID: 2147483645 > efffVQ > 2147483645
ID: 2147483646 > NfffVQ > 2147483646
ID: 2147483647 > ffffVQ > 2147483647
ID: 2147483648 > nnnnnu > -2147483648
ID: 2147483649 > dnnnnu > -2147483647
ID: 2147483650 > rnnnnu > -2147483646
Information about integers on the PHP official website: http://php.net/manual/zh/language.types.integer.php