Home Menu

is_null

Finds whether a variable is NULL

Syntax

is_null ( mixed $var ) : bool

Parameters

var

The variable being evaluated.

Return

Returns TRUE if var is null, FALSE otherwise.

Examples

1

<?

$var = null;

$return = is_null($var);

echo $return;

?>
1

2

<?

// $var does not exist

$return = is_null($var);

echo $return;

?>
1

PHP

JesusBible
HTMLCSSJSPHPSVGMore
AboutTerms