3v4l.org

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