如何返回一个非常小的数字作为floatval()但不是科学记数法,而不是使用sprintf,因为它返回一个字符串

Summary

Problem

very small float returns either as string or as scientific notation.

Expected

very small float will return as a number.

More Info

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.