PHP doubleval() Function

PHP doubleval() Function

The doubleval() function in PHP is used to give the float value of a variable. This function is an alias of floatval().

Syntax

doubleval ( mixed $var )

Parameter

var(required)– This parameter represents the name of the variable that is to be converted.

Return

This function returns the float value for the specified variable.

Example 1

 

Output

The variable: 417.209mln
After the doubleval() function
New Variable: 417.209 

Example 2

 

Output

The variable: The417.209mln
After the doubleval() function
New Variable: 0 

Example 3

 

Output

The variable: 
After the doubleval() function
New Variable: 0 

Example 4

 

Output

The variable: 1287654377544
After the doubleval() function
New Variable: 1287654377544