PHP Tutorial Tutorials - PHP Floating point numbers

Floating point numbers

Floating point numbers also known as "floats", "doubles".
By default, doubles print with the minimum number of decimal places needed.

<?php
    $a = 1.234; 
    $b = 1.2e3;
    $c = 7E-10;
    $d = 3.666;

    $e = $a + $d;
   
    echo ("$a + $d = $e <br>");
?> 

Output:

1.234 + 3.666 = 4.9 
Date:2019-10-01 00:11:11 From:www.Lautturi.com author:Lautturi