Chapter 6. Types

Table of Contents
Booleans
Integers
Floating point numbers
Strings
Arrays
Objects
Type Juggling

PHP supports the following types:

The type of a variable is usually not set by the programmer; rather, it is decided at runtime by PHP depending on the context in which that variable is used.

If you would like to force a variable to be converted to a certain type, you may either cast the variable or use the settype() function on it.

Note that a variable may behave in different manners in certain situations, depending on what type it is at the time. For more information, see the section on Type Juggling.

Booleans

This is the simpelest. Either TRUE or FALSE.