Floats in PHP: Handling Decimal Numbers
☰Fullscreen
Table of Content:
A float (a floating-point number) is a number with a decimal point or a number in exponential form.
In the following example, $x is a float. The PHP var_dump() function returns the data type and value:
Example Code:
Output:
The above code will produce the following result-
float(10.365)