Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ 32-bit and 64-bit integer in PHP and MySQL range     - Java Annotation Comments (Programming)

- Linux install Maven and SVN client (Linux)

- Linux Network Analysis Tcpdump Command Guide (Linux)

- OpenSSL for secure transmission and use of skills of files between Windows and Linux (Linux)

- Optimized to minimize the installation of CentOS 5.8 (Linux)

- Git build a team development environment operating drills (Linux)

- Spring Boot + Nginx + Tomcat + SSL configuration notes (Server)

- Linux System Getting Started Learning: Change the name of the network interface on CentOS7 (Linux)

- CentOS 6.2 install git error Perl5 (Linux)

- Linux and Windows Security Topics (Linux)

- The Rabbitmq installation under CentOS 6.4 (Linux)

- React Native (Programming)

- Ubuntu 14.10 installation SecureCRT 7.3 (Linux)

- Mount NFS network file system (Linux)

- Introduction to Linux system process monitoring tools (Linux)

- Linux find command usage practices (Linux)

- C # how to generate a folder or file automatically rename (Programming)

- Linux System Getting Started Learning: Linux command in w (Linux)

- Oracle 11g user rights management study notes (Database)

- Figlet use (Linux)

 
         
  32-bit and 64-bit integer in PHP and MySQL range
     
  Add Date : 2018-11-21      
         
         
         
 

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

     
         
         
         
  More:      
 
- Hadoop namenode do NFS disaster recovery (Server)
- Java Prototype Pattern (Programming)
- SSH Filesystem use a secure connection for network file system (Linux)
- Use a soft Raid play multiple SSD hard drive performance and enhance data security (Linux)
- AngularJS - Getting Started with Routing (Programming)
- The REVERSE function of DB2 (Database)
- Nginx start, stop, smooth start, smooth upgrade (Server)
- Apache POI Excel Document Processing (Linux)
- Joseph Central Java implementation (Programming)
- OpenCV 3.0 + Python 2.7 installation and testing under Ubuntu 14.04 (Linux)
- OS X CAOpenGLLayer how to enable OpenGL 3.2 core profile (Programming)
- Ubuntu install OpenMPI (Linux)
- What Java 8 fastest garbage collector (Programming)
- OpenVPN offsite interconnecting room availability and load balancing solution (Server)
- Nginx logging client ip (Server)
- Installing PHP Memcache extension under Linux (Server)
- Android media library of analysis: MediaProvider (Programming)
- Java memory area and memory overflow exception (Programming)
- Enterprise-class GitHub warehousing environment build (Server)
- extundelete: the Linux-based open source data recovery tools (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.