PHP supports the following basic data types
- Integer—Used for whole numbers
- Float (also called double)—Used for real numbers
- String—Used for strings of characters
- Boolean—Used for true or false values
- Array—Used to store multiple data items
- Object—Used for storing instances of classes
Three special types are also available: NULL, resource, and callable.
Variables that have not been given a value, have been unset, or have been given the specific value NULL are of type NULL.
Certain built-in functions (such as database functions) return variables that have the type resource. They represent external resources (such as database connections). You will almost certainly not directly manipulate a resource variable, but frequently they are returned by functions and must be passed as parameters to other functions.
Callables are essentially functions that are passed to other functions