25th November 2019


What is data type and its types?

In computer science and computer programming, a data type or simply type is a classification of data which tells the compiler or interpreter how the programmer intends to use the data. Most programming languages support various types of data, for example: real, integer or Boolean.

Similarly, you may ask, what are the 5 types of data?

PHP supports the following data types:
  • String.
  • Integer.
  • Float (floating point numbers - also called double)
  • Boolean.
  • Array.
  • Object.
  • NULL.
  • Resource.

What are the five types of data?

There are five basic data types associated with variables:
  • int - integer: a whole number.
  • float - floating point value: ie a number with a fractional part.
  • double - a double-precision floating point value.
  • char - a single character.
  • void - valueless special purpose type which we will examine closely in later sections.

What is a string data type?

In computer programming, a string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. The latter may allow its elements to be mutated and the length changed, or it may be fixed (after creation).
Write Your Answer


60% people found this answer useful, click to cast your vote.

3 / 5 based on 3 votes.


Press Ctrl + D to add this site to your favorites!