A byte is 8 bits, so 32-bit int type occupies 32/8 = 4 bytes, 64-bit int type occupies 64/8 = 8 bytes.
32-bit, 64-bit unsigned integer Max: 2 ^ 64-1 = 18446744073709551615 2 ^ 32-1 = 4294967295
32-bit, 64-bit signed integer Max: (2 ^ 32) / 2-1 = 2147483647 (2 ^ 64) / 2-1 = 9223372036854775807
1 is reduced because an integer including 0.
64 Wei Ubuntu 14.04, PHP_INT_MAX value 9223372036854775807, with MySQL bigint type in the maximum symbol of the same 32 Wei Ubuntu 14.04, PHP_INT_MAX value of 2147483647, signed with MySQL. int type as the maximum echo date ( 'Ymd H: i: s', PHP_INT_MAX); return 2038-01-19 11:14:07 echo strtotime (' 2038-01. -19 11:14:07 '); return 2147483647 echo strtotime (' 2038-01-19 11:14:08 '); 32 bits The following returns an empty That is, PHP on the system of time 32 bit () returns only the largest timestamp 2038-01-19 11:14:07.
field types: `posted` int (10) unsigned NOT NULL DEFAULT '0' on 32-bit MySQL (64 Wei MySQL too), than insert a 32-bit unsigned int type Max 2 ^ 32-1 = 4,294,967,295 larger number error occurs: UPDATE `punbb`.`pb_topics` SET` posted` = '4294967296' WHERE `pb_topics`.`id` = 1; Warning: # 1264 Out of range value for column 'posted' at row 1 However, MySQL can use 8-byte bigint type to store 64-bit integers |