The integer range of 32-bit and 64-bit PHP and MySQL is 8 bytes, so the 32-bit int type occupies 32-bit/8-bit = 4 bytes, 64-bit int occupies 64-bit/8-bit = 8 bytes.
32-bit, 64-bit unsigned integer maximum value:
2 ^ 64-1 = 18446744073709551615
2 ^ 32-1 = 4294967295
32-bit, 64-bit signed integer maximum value:
(2 ^ 32)/2-1 = 2147483647
(2 ^ 64)/2-1 = 9223372036854775807
Minus 1 because integer values include 0.
For 64-bit Ubuntu 14.04, the PHP_INT_MAX value is 9223372036854775807, which is the same as the maximum value of the signed bigint type in MySQL.
For 32-bit Ubuntu 14.04, the value of PHP_INT_MAX is 2147483647, which is the same as the maximum value of the signed int type in MySQL.
Echo date ('Y-m-d H: I: S', PHP_INT_MAX); 2038-01-19 11:14:07
Echo strtotime ('2017-01-19 11:14:07 '); 2038 is returned.
Echo strtotime ('2017-01-19 11:14:08 '); return null in 32 bits
That is to say, the time () of PHP on a 32-bit system can only return a timestamp of 11:14:07.
Field type: 'posted' int (10) unsigned not null default '0'
On a 32-bit MySQL instance (the same is true for 64-bit MySQL), an error occurs when you insert a value greater than the maximum value of the 32-bit unsigned int type 2 ^ 32-1 = 4294967295:
UPDATE 'punbb '. 'pb _ topics' SET 'posted' = '000000' WHERE 'pb _ topics '. 'id' = 1;
Warning: #1264 Out of range value for column 'posted' at row 1
However, MySQL can use the 8-byte bigint type to store 64-bit integers.
This article permanently updates the link address: Http://www.linuxidc.com/Linux/2016-02/128479.htm