The function is_scalar() whether a variable is a scalar. Scalar variables are those containing an int, float, string or bool. Types array, object and resource are not scalar.
bool is_scalar ( mixed $value )
Sr.No | Parameter & Description |
---|---|
1 |
value The variable being evaluated. |
This function returns true if value is a scalar, false otherwise. This function does not consider NULL to be scalar.