Closed
Description
Description
The following code:
<?php
var_dump(
round(0.01, -1, RoundingMode::AwayFromZero),
round(0.01, -2, RoundingMode::AwayFromZero),
bcround('0.01', -1, RoundingMode::AwayFromZero),
bcround('0.01', -2, RoundingMode::AwayFromZero),
);
Resulted in this output:
float(10)
float(100)
string(2) "10"
string(1) "0" // this is wrong
But I expected this output instead:
float(10)
float(100)
string(2) "10"
string(3) "100"
PHP Version
PHP 8.4 >=
Operating System
No response