PHP Data Types

In this tutorial you will learn about the PHP Data Types and its application with practical example.

PHP supports total of eight data types which we use to define our variables:

Table Of Contents
  • Integers: Whole numbers, without a decimal point.
  • Doubles: Floating-point numbers, like 5.234 or 3.25.
  • Booleans: True or False.
  • NULL: Special type that only has one value: NULL.
  • Strings:Sequences of characters.
  • Arrays: An indexed collections values.
  • Objects: Instances of a user defined classes, which can encapsulate properties and data that are specific to the class.
  • Resources: Hold references to resources external to PHP (such as database connections).

In this tutorial we have learn about the PHP Data Types and its application with practical example. I hope you will like this tutorial.