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)
Contenuti correlati
- CSS
- HTML
- JavaScript
- jQuery
- PHP
- SQL
- WORDPRESS
0 Comment