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:
Return Value: It returns float value of given variable. Empty array returns 0 and non-empty array returns 1.