PHP supports 8 primitive data types.
Four scalar types:
boolean (Boolean) false and true
Only two values ??
integer (integer )
That is, non-decimal number
float (floating point type, also called double (the value range is smaller than float))
Decimal number
string (string)
Two composite types:
array (array)
object (object)
Finally There are two special types:
resource (resource)
NULL (no type)
In order to ensure the readability of the code, this manual also introduces some Pseudo-type:
mixed (mixed type)
number (numeric type)
callback (callback type)
More detailed description LZ can be searched on Baidu: PHP data types will be introduced in detail