[PHP] is_int()

is_int() (funzione PHP) verifica se una variabile è un numero di tipo intero. Restituisce un valore booleano.

tips&tricks

Ha come alias is_integer e is_long.

Per ottenere il tipo di dato, gettype()

Sintassi

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

Esempi

echo is_int(3); // true (1)

Fonti esterne

funzioni php, php

Related Articles

0 Comment