Opposite to scalar variables
2 answers
In terms of data type (for PHP, not C):
Most often, a scalar type is a primitive data type. Also, you have composite types (arrays, objects) and other types (resource descriptors) (this datatype classification builds on those from Wikipedia ).
It is NULL
not a scalar in PHP .
This aligns with the groups specified in Types Introduction to the PHP Manual :
- scalar types: boolean , integer , float , string
- composite types: array , object
- special types: resource , NULL
And from the PHP manual for is_scalar
function :
Scalar types are those that contain an integer , float , string, or boolean . The array , object, and resource types are not scalar.
+4
source to share