PHP Float

Rumman Ansari   Software Engineer   2020-02-06   5520 Share
☰ Table of Contents

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:


<?php

$x = 10.365;
var_dump($x);

?>


Output:

The above code will produce the following result-


float(10.365)