3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = 1009.1; for($a = .5; $a < 20; $a = $a + 0.5){ echo $a . " = " . number_format(round($a,-1)) . " <br> " ; }
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
0.5 = 0 <br> 1 = 0 <br> 1.5 = 0 <br> 2 = 0 <br> 2.5 = 0 <br> 3 = 0 <br> 3.5 = 0 <br> 4 = 0 <br> 4.5 = 0 <br> 5 = 10 <br> 5.5 = 10 <br> 6 = 10 <br> 6.5 = 10 <br> 7 = 10 <br> 7.5 = 10 <br> 8 = 10 <br> 8.5 = 10 <br> 9 = 10 <br> 9.5 = 10 <br> 10 = 10 <br> 10.5 = 10 <br> 11 = 10 <br> 11.5 = 10 <br> 12 = 10 <br> 12.5 = 10 <br> 13 = 10 <br> 13.5 = 10 <br> 14 = 10 <br> 14.5 = 10 <br> 15 = 20 <br> 15.5 = 20 <br> 16 = 20 <br> 16.5 = 20 <br> 17 = 20 <br> 17.5 = 20 <br> 18 = 20 <br> 18.5 = 20 <br> 19 = 20 <br> 19.5 = 20 <br>