PHP is_float(), is_double(), is_real() Functions
is_float() The function is used to check whether a variable is of float type.
**Alias functions:** is_double(), is_real().
**Note:** To test whether a variable is a number or numeric string (such as form input, which is usually a string), you must use is_numeric().
PHP version requirement: PHP 4, PHP 5, PHP 7
Syntax
bool is_float ( mixed $var )
Parameter Description:
- $var: the variable to check.
Return Value
If the specified variable is a float, returns TRUE; otherwise returns FALSE.
Example
Example
The output is:
这是一个浮点类型的值
bool(false)
bool(false)
bool(false)
bool(false)
Available PHP Functions