In PHP, convert signed integer to unsigned integer. In PHP, the signed integer type is converted to the unsigned integer type. in a short address project, the php integer type is based on the ing algorithm between the six characters and the ID, when the ID exceeds 2147483647, PHP converts signed integer to unsigned integer, and php integer
In a short address project, when the ID exceeds 2147483647, the ing ID of a six-character short address is converted into a signed integer.
The code is as follows:
ID> six-character> ing ID
ID: 2147483644> TfffVQ> 2147483644
ID: 2147483645 & gt; efffVQ & gt; 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 integer to unsigned integer: (float) sprintf ('% u', $ id)
PHP official website information on integer: http://php.net/manual/zh/language.types.integer.php
In a short address project, according to the ing algorithm between the six characters and the ID, when the ID exceeds 2147483647...