3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo round('0.48499999999999', 2) . "\n"; echo round('0.484999999999999', 2) . "\n"; echo round('10.4849999999999', 2) . "\n"; echo round('10.48499999999999', 2) . "\n"; echo round('100.484999999999', 2) . "\n"; echo round('100.4849999999999', 2) . "\n"; echo round('1000.48499999999', 2) . "\n"; echo round('1000.484999999999', 2) . "\n"; echo round('10000.4849999999', 2) . "\n"; echo round('10000.48499999999', 2) . "\n"; echo round('100000.484999999', 2) . "\n"; echo round('100000.4849999999', 2) . "\n"; echo round('1000000.48499999', 2) . "\n"; echo round('1000000.484999999', 2) . "\n"; echo round('10000000.4849999', 2) . "\n"; echo round('10000000.48499999', 2) . "\n"; echo round('100000000.484999', 2) . "\n"; echo round('100000000.4849999', 2) . "\n"; echo round('1000000000.48499', 2) . "\n"; echo round('1000000000.484999', 2) . "\n"; echo round('10000000000.4849', 2) . "\n"; echo round('10000000000.48499', 2) . "\n";
Output for 5.3.0 - 5.3.3, 5.3.7 - 7.1.0
0.48 0.48 10.48 10.49 100.48 100.49 1000.48 1000.49 10000.48 10000.49 100000.48 100000.49 1000000.48 1000000.49 10000000.48 10000000.49 100000000.48 100000000.49 1000000000.48 1000000000.49 10000000000.48 10000000000.49
Output for 5.3.4 - 5.3.6
0.48 0.49 10.48 10.49 100.48 100.49 1000.48 1000.49 10000.48 10000.49 100000.48 100000.49 1000000.48 1000000.49 10000000.48 10000000.49 100000000.48 100000000.49 1000000000.48 1000000000.49 10000000000.48 10000000000.49
Output for 5.2.7 - 5.2.17
0.49 0.49 10.48 10.49 100.48 100.48 1000.48 1000.48 10000.48 10000.48 100000.48 100000.48 1000000.48 1000000.48 10000000.48 10000000.48 100000000.48 100000000.48 1000000000.48 1000000000.48 10000000000.48 10000000000.48
Output for 4.3.0 - 5.2.6
0.48 0.48 10.48 10.48 100.48 100.48 1000.48 1000.48 10000.48 10000.48 100000.48 100000.48 1000000.48 1000000.48 10000000.48 10000000.48 100000000.48 100000000.48 1000000000.48 1000000000.48 10000000000.48 10000000000.48