0 votes
1.0k views
in General by

1 Answer

0 votes
by

There are 8 data types in PHP which are used to construct the variables:

  1. Integers − are whole numbers, without a decimal point, like 4195.
  2. Doubles − are floating-point numbers, like 3.14159 or 49.1.
  3. Booleans − have only two possible values either true or false.
  4. NULL − is a special type that only has one value: NULL.
  5. Strings − are sequences of characters, like ‘PHP supports string operations.’
  6. Arrays − are named and indexed collections of other values.
  7. Objects − are instances of programmer-defined classes, which can package up both other kinds of values and functions that are specific to the class.
  8. Resources − are special variables that hold references to resources external to PHP.

Related questions

0 votes
1 answer 1.2k views
0 votes
1 answer 972 views
asked Oct 29, 2021 in General by anonymous
0 votes
1 answer 12.8k views
asked Aug 19, 2016 in General by Shed
0 votes
1 answer 838 views
0 votes
2 answers 12.0k views
0 votes
1 answer 1.1k views
asked Aug 19, 2016 in General by Azi Graeber
...