Open In App

PHP | doubleval() Function

Last Updated : 11 Jul, 2025
Summarize
Comments
Improve
Suggest changes
Share
Like Article
Like
Report
The doubleval() is an inbuilt function in PHP which is used to get a float value of a variable. This function is an alias of floatval(). Syntax:
doubleval ( $variable_name )
Parameters: This function accepts one parameter $variable_name as shown in above syntax. It is a mandatory parameter. This parameter specifies the name of variable that is to be converted. This parameter can be of mixed type example integer, string, etc. Return Value: It returns float value of given variable. Below programs illustrate the use of doubleval() function in PHP: Program 1:
Output:
41681.27
Program 2:
Output:
47.129
Related Articles: Reference:https://www.php.net/manual/en/function.doubleval.php

Similar Reads