What is an integer data type? an integer is an integer that we often call. it can only be an integer. for example, if we wrote 123456, my age is 20, this is an integer, or-123456, this represents an integer. all of these values are in decimal format. you can also write octal numbers and hexadecimal values, which all represent an integer. If the octal representation is used, 0 must be added before the number. if the hexadecimal format is used, 0x must be added. The integer must have a valid range. the valid range is-2447483648 ~ + 2147483647 since there is a storage range, now we... what is an integer data type? an integer is an integer that we often call. it can only be an integer. for example, if we wrote 123456, my age is 20, this is an integer, or-123456, this represents an integer. all of these values are in decimal format. you can also write octal numbers and hexadecimal values, which all represent an integer. If the octal representation is used, 0 must be added before the number. if the hexadecimal format is used, 0x must be added. The integer must have a valid range. the valid range is-2447483648 ~ + 2147483647 since there is a storage range, do we say that the sum of the two integers must be equal to the integer value? it is not necessarily because the storage range of the two integers is exceeded, it's called overflow. what do you mean? let's just say, if you want to hold 10 liters of water for a one-litre cup, you will leave it out if you cannot hold it, now that you want to hold 10 liters of water, you can only hold a larger container. Therefore, when the given value is beyond the maximum range expressed by the int type, it will be processed as a float type, and the storage range of the floating point type is larger than that of the integer type. If an invalid number (8 and 9) appears in the octal chart
1. php: an example of integer data type
Description: the integer value can be in decimal, hexadecimal, octal, or binary format. an optional symbol (-or +) can be added before it ). Integer expressed in binary format is available in PHP 5.4.0.
4. PHP Data type (1) _ PHP Tutorial
Description: data type in PHP (1 ). PHP supports eight primitive types. Four scalar types: boolean (integer) integer float (floating point) (floating point, also known as "double") string (string)
5. PHP supports eight primitive types
Introduction: PHP supports eight primitive types. PHP supports eight primitive types. Four scalar types: boolean-true or fasle, both of which are case-insensitive integer-32-bit systems; range:-2 147 483 648 ~ + 2 147 483 647 float (float) (floating point number, also "double")-32-bit system, range: 1.7E-308 ~
6. PHP supports eight primitive types
Introduction: PHP supports eight primitive types. PHP supports eight primitive types. Four scalar types: boolean (true) -- true or fasle both are case-insensitive integer-32-bit systems, range:-2 147 483 648 ~ + 2 147 483 647 float (float) (floating point, also "double")-32-bit system, range: 1.7E-308 ~ 1
7. data types in PHP (1)
Description: data type in PHP (1 ). PHP supports eight primitive types. Four scalar types: boolean (integer) integer float (floating point) (floating point, also known as "double") string (string)
[Related Q & A recommendations ]:
The above is a summary of the notes on Integer. For more information, see other related articles in the first PHP community!