is_null

Prüft ob eine Variable NULL enthält

Beschreibung

bool is_null ( mixed $var )

Prüft ob die gegebene Variable NULL enthält

Parameter-Liste

var

Die zu prüfende Variable.

Rückgabewerte

Liefert TRUE wenn var null enthält, sonst FALSE.

Beispiele

Beispiel #1 is_null-Beispiel

<?php

error_reporting
(E_ALL);

$foo NULL;
var_dump(is_null($inexistent), is_null($foo));

?>
Notice: Undefined variable: inexistent in ...
bool(true)
bool(true)

Siehe auch

  • Der NULL-Typ
  • isset
  • is_bool
  • is_numeric
  • is_float
  • is_int
  • is_string
  • is_object
  • is_array