Current Location: Home> Function Categories> is_double

is_double

is_float alias
Name:is_double
Category:Variable processing
Programming Language:php
One-line Description:is_float() alias.

Definition and usage

is_double() function checks whether the variable is of type float.

This function is an alias for is_float() .

Tip: In PHP, floats and doubles are considered to be of the same type. Therefore, the is_double() function is actually just an alias for is_float() function. In actual use, it is more recommended to use the is_float() function because its name describes its function more accurately.

Example

Check whether the variable is float type:

 <?php
$a = 32 ;
echo "a is " . is_double ( $a ) . "<br>" ;

$b = 0 ;
echo "b is " . is_double ( $b ) . "<br>" ;

$c = 32.5 ;
echo "c is " . is_double ( $c ) . "<br>" ;

$d = "32" ;
echo "d is " . is_double ( $d ) . "<br>" ;

$e = true ;
echo "e is " . is_double ( $e ) . "<br>" ;

$f = "null" ;
echo "f is " . is_double ( $f ) . "<br>" ;

$g = 1.e3 ;
echo "g is " . is_double ( $g ) . "<br>" ;
?>

Try it yourself

grammar

 is_double ( variable ) ;
parameter describe
variable Required. Specifies the variable to check.
Similar Functions
  • Check if a variable is empty empty

    empty

    Checkifavariableisem
  • Free the given variable unset

    unset

    Freethegivenvariable
  • alias for floatval doubleval

    doubleval

    aliasforfloatval
  • Print variable related information var_dump

    var_dump

    Printvariablerelated
  • Get the integer value of the variable intval

    intval

    Gettheintegervalueof
  • Detect whether a variable is an integer is_int

    is_int

    Detectwhetheravariab
  • Detect whether the variable is null is_null

    is_null

    Detectwhetherthevari
  • Detect whether the variable is boolean is_bool

    is_bool

    Detectwhetherthevari