php.js : empty() function
empty() function
The empty() function checks whether a variable is empty or not and returns true or false.
Version:
1103.1210
Syntax:
empty(var_name)
Parameters:
Name | Description | Required / Optional |
Type |
---|---|---|---|
var_name | The variable to be checked. | Required | Mixed* |
*Mixed : Mixed indicates that a parameter may accept multiple (but not necessarily all) types.
Example of php.js empty() function:
In the following web document empty() function checks whether a value is empty or not.
Output of the function:
empty('') true empty(null) true
View example of php.js empty() function in browser
Previous: php.js : time() function
Next:
php.js: floatval() function