PHP doubleval

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PHP : doubleval() function

Description

The doubleval() function is used to get a float value of a variable. This function is an alias of floatval().

Version

(PHP 4 and above)

Syntax

doubleval(var_name)

Parameter

Name Description Required /
Optional
Type
var_name The variable being checked. Required Mixed*

*Mixed : Mixed indicates that a parameter may accept multiple (but not necessarily all) types.

Return value

Value Type : Float.

Example :

  1. <?php$var_name = doubleval('422.300453test');echo $var_name;?>  

Output :

422.300453