is_long
is_int alias
is_long()
function checks whether the variable is an integer type.
This function is an alias for is_int()
.
In modern PHP code, it is recommended to use is_int()
.
Check whether the variable is an integer type:
<?php $a = 32 ; echo "a is " . is_long ( $a ) . "<br>" ; $b = 0 ; echo "b is " . is_long ( $b ) . "<br>" ; $c = 32.5 ; echo "c is " . is_long ( $c ) . "<br>" ; $d = "32" ; echo "d is " . is_long ( $d ) . "<br>" ; $e = true ; echo "e is " . is_long ( $e ) . "<br>" ; $f = "null" ; echo "f is " . is_long ( $f ) . "<br>" ; ?>
Try it yourself
is_long ( variable ) ;
parameter | describe |
---|---|
variable | Required. Specifies the variable to check. |