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
Software version and AccessApache 2.4.25 Win64 | MySQL Server 5.7.17 Win64 | PHP 7.0 x64 Thread SafeApache 2.4.25 Win64
Apache HTTP Server (http://httpd.apache.org/Web server)Picture. png
Click Download, and PAGE upPicture. png
Site
One byte has 8 bits, so the 32-bit int occupies 32-bit/8-bit = 4-byte, and 64-bit int uses 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
Project requirements: encode a 64-bit integer into a network byte sequence. I know that pack (& #039; J & #039;, $ bigint) can be used in php5.6.3 and later versions ), but in this case, I have to disagree with the new php version. Now the company
Compatibility of PHP built-in functions with 32-bit and 64-bit platforms. In the LieHuo. Net tutorial, the integer in PHP is the long type in the C language and is signed. The maximum value is 2 ^ 31. On a 64-bit platform, the length can reach 2 ^ 63
In PHP, the conversion of data types can be done directly using the pack. For example, the character type, short integer, integral type, long integer can be used respectively, the parameters C, s, I, N to express, of course, the converted data here
This article analyzes the usage differences between floating-point (float) and integer (integer) data types in PHP and, in that case, insufficient data lengths.
The value can only be true or false, and when other types are converted to Boolean, the
www.Bkjia.com Tutorial The integer in PHP is the long type in the C language, is signed, and the maximum value is 2^31. On a 64-bit platform, long can reach 2^63.
In this case, some of the results of the PHP function output will be inconsistent on
Clevercode recently encountered a PHP project shaping transformation problem, MySQL has a field ID is bigint, there is a long integer, such as id = 5147486396. However, the PHP code is deployed in several machines for historical reasons, including a
This article analyzes the differences between float and integer data types in php and the insufficient data length in that case. The value can only be True or False. when other types are converted to the boolean type, the following values are
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.