PHP consists of 4 basic data types:
boolean - a boolean is actually much like an integer, but with only two possible values: 0 or 1, which is either false or true.
integer - a number with no decimals, e.g 3 or 42.
float (sometimes referred to as double) - a number that may include decimals, e.g. 42.3 or 10.9.
string - A number of characters, which combined makes a text string.
Besides that, there are a couple of more complex datatypes:
array - holds an array of items, e.g. several strings or several integers. An array may contain variables which are arrays which are arrays and so on.
object - a reference to an instance of a class. This is related to Object Oriented programming, which we will talk more about later on in this tutorial.
There are also a couple of special types:
resource - holds a reference to a special external resource. It may be a file resource, or perhaps an open database connection.
NULL - a value of null is nothing. It's not the same as 0 (zero), because that's actually a value. Null is truly nothing. Variables which have not yet been assigned a value, or which you have used the unset() method on, will carry the NULL value. This is useful if you wish to check whether or not a variable contains any value - you may compare it against the NULL constant.
In the next couple of chapters, we will look into working with both strings and numbers (integers and floats), and later on, we will look into both arrays and objects.