Php Is_Scalar Function
# PHP is_scalar() Function
[PHP Available Functions](#)
The **is_scalar()** function is used to check whether a variable is a scalar.
Scalar variables are those containing an integer, float, string, or boolean. Arrays, objects, and resources are not scalars.
PHP 4 >= 4.0.5, PHP 5, PHP 7
### Syntax
bool is_scalar ( mixed $var )
Parameter Description:
* $var: The variable to check.
### Return Value
Returns TRUE if the specified variable is a scalar, otherwise returns FALSE.
### Example
## Example
The output is:
3.1416 array(3) { => string(6) "Tutorial" => string(6) "Google" => string(8) "Facebook"}
[PHP Available Functions](#)
YouTip