Current Location: Home> Function Categories> is_real

is_real

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

Definition and usage

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

This function is an alias for is_float() .

Example

Check whether the variable is float type:

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

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

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

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

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

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

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

Try it yourself

grammar

 is_real ( variable ) ;
parameter describe
variable Required. Specifies the variable to check.
Similar Functions
Popular Articles