[PHP] is_null()

is_null() (funzione PHP) verifica se una variabile è null. Restituisce un valore booleano.

tips&tricks

In caso di variabile undefined, genera un errore notice.

Per ottenere il tipo di dato, gettype()

Sintassi

is_null($var);
parametro descrizione
$var La variabile da processare

Esempi

$var = null;
echo is_null($var); // true (1)

Fonti esterne

funzioni php, php

Related Articles

0 Comment