PHP Floating Data Type With Examples

Float Data Type

A float (floating point number) is a number with a decimal point or a number in exponential form.

Floating point is also known as "floats", "doubles", or "real numbers".

It Can hold numbers containing fractional or decimal(2.56, 1.24, 7E-10) part including positive and negative numbers. By default, the variables add a minimum number of decimal places.

Example:



Result:


 float(1.234)
 float(10200)
 float(4.0E-10)

Read More: