PHP | doubleval() Function Last Updated : 02 Jul, 2019 Comments Improve Suggest changes 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: php <?php // PHP program to illustrate // doubleval() function $var = '41.68127E3'; $double_value = doubleval($var); echo $double_value; ?> Output: 41681.27 Program 2: php <?php // PHP program to illustrate // doubleval() function $var = '47.129mln'; $double_value = doubleval($var); echo $double_value; ?> Output: 47.129 Related Articles: PHP | floatval() Function PHP | boolval() Function Reference:http://php.net/manual/en/function.doubleval.php Comment More infoAdvertise with us Next Article PHP | doubleval() Function S sid4321 Follow Improve Article Tags : Web Technologies PHP PHP-function Similar Reads PHP eval() Function PHP eval() function in PHP is an inbuilt function that evaluates a string as PHP code. Syntax: eval( $string ) Parameters: This function accepts a single parameter as shown in the above syntax and described below. $string: It must consist of a valid PHP code to be evaluated but should not contain op 2 min read PHP | is_double() Function The is_double() function is an inbuilt function in PHP which is used to find whether the given value is a double or not. Syntax: bool is_double( $variable_name ) Parameters: This function accepts one parameter as mentioned above and described below: $variable_name: This parameter holds the value whi 2 min read PHP | boolval() Function The boolval() function is an inbuilt function in PHP which gives the Boolean value for a given expression. Syntax: boolean boolval( $expr ) Parameter: This function accepts only one parameter as shown in above syntax and described below: $expr: The expression or the scalar which you want to change i 3 min read PHP | floatval() Function The floatval() function is an inbuilt function in PHP which returns the float value of a variable. Syntax: float floatval ( $var ) Parameters: This function accepts one parameter which is mandatory and described below: $var: The variable whose corresponding float value will be returned. This variabl 1 min read PHP fdiv() Function The fdiv() is an inbuilt PHP function that returns the result of a division of 2 numbers(in accordance with IEEE 754). The NaN will never == or === for any value while doing the comparison, even including itself. Syntax: fdiv(float $num1, float $num2): floatParameters: This function accepts 2 parame 1 min read Like