Float (Double)

$float1 = 1.234;
$float2 = 1.2e7;
$float3 = 7E-10;
$float4 = 1\_234.567;  // as of PHP 7.4.0
var\_dump($float4);    // float(1234.567)
$float5 = 1 + "10.5";   # => 11.5
$float6 = 1 + "-1.3e3"; # => -1299
Comments