Best to know

  • PHP Integers

    2, 256, -256, 10358, -179567 are all integers.

    An integer is a number without any decimal part.

    An integer data type is a non-decimal number between -2147483648 and 2147483647 in 32 bit systems, and between -9223372036854775808 and 9223372036854775807 in 64 bit systems. A value greater (or lower) than this, will be stored as float, because it exceeds the limit of an integer.

    Note: Another important thing to know is that even if 4 * 2.5 is 10, the result is stored as float, because one of the operands is a float (2.5).

    Here are some rules for integers:

  • An integer must have at least one digit
  • An integer must NOT have a decimal point
  • An integer can be either positive or negative
  • Integers can be specified in three formats: decimal (base 10), hexadecimal (base 16 - prefixed with 0x), octal (base 8 - prefixed with 0) or binary (base 2 - prefixed with 0b)

PHP has the following predefined constants for integers:

  • PHP_INT_MAX - The largest integer supported
  • PHP_INT_MIN - The smallest integer supported
  • PHP_INT_SIZE -  The size of an integer in bytes

PHP has the following functions to check if the type of a variable is integer:



Leave A Comment


Last Visited Articles


Info Board

Visitor Counter
0
 

Todays visit

41 Articles 1982 RSS ARTS 106 Photos

Popular News

🚀 Welcome to our website! Stay updated with the latest news. 🎉

United States

18.116.15.16 :: Total visit:


Welcome 28.226.25.26 Click here to Register or login
Oslo time:2025-04-03 Whos is online (last 5 min): 
1 - United States - 2a03:2880:f800:09::
2 - United States - 2a03:2880:f800:9::
3 - United States - 2a03:2880:f800:d::
4 - United States - 2a03:2220:f200:2::
5 - United States - 7a03:7770:f700:a::
6 - United States - 2a03:2880:f800:8::
7 - United States - 2a00:2880:f800:07::
8 - United States - 2a03:2880:f800:c::
9 - United States - 7a03:7880:f800:7::
10 - United States - 6a03:6660:f600:64::
11 - United States - 2a03:2880:f800:62::
12 - United States - 22.267.244.227
13 - United States - 1a01:1880:f800:15::
14 - United States - 2a03:2880:f800:f::
15 - United States - 2a08:2880:f800::
16 - United States - 2a03:2880:f800:7a::
17 - Singapore - 47.628.48.35
18 - United States - 2a03:2440:f400:44::
19 - United States - 2a03:2880:f800:8b::
20 - United States - 3.222.797.777
21 - United States - 2a03:2880:f800:b::
22 - United States - 2a77:2887:f877:7c::
23 - United States - 2a13:2881:f811:4::
24 - United States - 2a07:2880:f800:7d::
25 - United States - 2a83:2888:f888:88::
26 - United States - 52.367.344.387
27 - United States - 98.82.47.768
28 - United States - 35.009.009.008
29 - United States - 44.207.207.36
30 - United States - 40.77.997.939
31 - Singapore - 47.428.97.444
32 - Singapore - 47.928.54.297
33 - Singapore - 47.929.36.936
34 - United States - 2a03:2880:27ff:74::
35 - Singapore - 27.228.22.0
36 - Singapore - 46.628.23.62
37 - United States - 3.740.250.773
38 - Singapore - 47.728.47.77
39 - Singapore - 47.888.84.80
40 - Singapore - 47.448.449.4
41 - Singapore - 47.828.884.238
42 - Singapore - 47.128.115.48
43 - Singapore - 47.128.52.124
44 - Hong Kong - 220.22.233.77
45 - United States - 66.666.65.66


Farsi English Norsk RSS