PHP supports eight primitive types.
Four scalar types:
Two compound types:
And finally two special types:
This manual also introduces some pseudo-types for readability reasons:
And the pseudo-variable $...
.
The type of a variable is not usually set by the programmer; rather, it is decided at runtime by PHP depending on the context in which that variable is used.