You might think it's easy to turn floating point (float) into a string in PHP, but the usual approach hides serious bugs. Because PHP has a very unreasonable way of handling floating-point numbers, there is a loss of precision. After research, in fact, PHP in the display of floating point of the problem, can also be said to be a bug. PHP built-in Echo, Var_dump, Json_encode, string concatenation functions (instructions) in the display floating-point numbers are problematic, resulting in loss of precision.
<?php
$a = 1315537636.338467;
printf ("%f", $a); echo "\ n";
echo $a. "\ n";
echo $a; echo "\ n";
?>
Results
1315537636.338467
1315537636.3385
1315537636.3385
In other words, the most convenient way to use PHP to convert floating-point numbers to strings or display is not possible, you must use printf/sprintf to convert floating-point numbers to strings.