Closed as not planned
Description
Description
The following code:
<?php
echo number_format(1599828571.23561241, 6, '.', '');
Resulted in this output:
1599828571.235613
But I expected this output instead:
1599828571.235612
This is the result with PHP < 8.4 and it sounds good to me either we consider round()
or floor()
as the best operation to use.
Context: precision matters in my case, as I aim to support float timestamp (possibly more precise than microseconds) then to round them as close as possible and in a consistent manner.
PHP Version
8.4 (master 2024-05-26)
Operating System
Both Ubuntu and Windows