PHP is_null() function

By using the is_null function, we can check whether the variable is NULL or not. This function was introduced in PHP 4.0.4.

SYNATX:

Parameter

ParameterDescriptionIs compulsory
varThe variable being evaluated.compulsory

Return Type:

The PHP is_null() function returns true if var is null, otherwise false.

Important Note:

We can unset the variable value by using the unset function.

Example 1

PHP is_null() function

Example 2

PHP is_null() function

Example 3

PHP is_null() function



Latest Courses