3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = 1111111.505; echo round($a, 2). "\n"; echo sprintf('%01.2F', $a). "\n"; echo bcmul($a, 100). "\n";
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
1111111.51 1111111.50 111111150
Output for 4.3.10 - 4.4.9, 5.0.3 - 5.2.17
1111111.5 1111111.50 111111150
Output for 4.3.2 - 4.3.9, 5.0.0 - 5.0.2
1111111.5 111111150
Output for 4.3.0 - 4.3.1
1111111.5 111111100