Home>Article>Backend Development> What does doubleval mean in php?

What does doubleval mean in php?

(*-*)浩
(*-*)浩 Original
2019-09-05 13:48:14 3644browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn