Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP is_null() Function

PHP is_null() Function

PHP Available FunctionsAvailable PHP Functions

is_null() The function is used to check whether a variable is NULL.

PHP version requirement: PHP 4 >= 4.0.4, PHP 5, PHP 7

Syntax


bool is_null ( mixed $var )

Parameter Description:

Return Value

If the specified variable is NULL, returns TRUE; otherwise returns FALSE.

Example

Example

The output is:


变量 var_name 不为 NULL
变量 var_name2 为 NULL

PHP Available FunctionsAvailable PHP Functions