Start · Sprachen · PHP · Referenz · is_null

is_null

Funktion

Prüft, ob ein Wert exakt <code>null</code> ist. Kürzer: <code>$v === null</code>.

seit PHP 4.0.4 Kategorie: type

Signatur

is_null(mixed $value): bool

Beschreibung

In modernem Code ist $v === null lesbarer und äquivalent.

Parameter

Name Typ Default Beschreibung
$value Pflicht mixed Wert.

Rückgabewert

Typ
bool
Beschreibung
true wenn null.

Beispiele

Basis

<?php

var_dump(is_null(null)); // true
var_dump(is_null(0));    // false