is_null

Finds whether a variable is null

Syntax

is_null(mixed $value): bool

Parameters

value

The variable being evaluated.

Return

Returns true if value is null, false otherwise.

Examples

1

<?

$value = null;

$return = is_null($value);

var_export($return);

?>
true

2

<?

// $value does not exist

$return = is_null($value);

var_export($return);

?>
true

boolval

debug_zval_dump

doubleval

empty

floatval

get_debug_type

get_defined_vars

get_resource_id

get_resource_type

gettype

intval

is_array

is_bool

is_callable

is_countable

is_double

is_float

is_int

is_integer

is_iterable

is_long

is_numeric

is_object

is_real

is_resource

is_scalar

is_string

isset

print_r

serialize

settype

strval

unserialize

unset

var_dump

var_export

PHP

Home Menu