Home>Article>Backend Development> What does doubleval mean in php?
PHP doubleval() function
Definition and usage (recommended learning:PHP video tutorial)
doubleval is an alias of floatval() function
Syntax
This function is an alias of floatval().
Note:
This alias is a legacy issue after the function was renamed. In older versions of PHP, there is no floatval() function, so you may need to use this floatval() alias function. Definition and usage
floatval function, obtains the floating point value of the variable
Syntax
float floatval ( mixed $var )
Returns the float value of the variable var .
Parameter description
var, var can be any scalar type. You cannot use floatval() with arrays or objects.
$var = '122.34343The';
$float_value_of_var = floatval ($var);
print $float_value_of_var; // 打印出 122.34343
?>
The above is the detailed content of What does doubleval mean in php?. For more information, please follow other related articles on the PHP Chinese website!