very small float returns either as string or as scientific notation.
very small float will return as a number.
I have a very small number that I fetch from my db.
$smallNumber = 0.0000006
, this number naturally returns as a string.
if I use floatval()
, i'll receive it as a scientific notated number = 6e-7
to turn it into a real float I normally use sprintf()
but sprintf returns it back to a string format.