3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $amount = 1009.1; for($a = .5; $a < 20; $a = $a + 0.5){ echo $amount . " = " . number_format(round($amount,-1)) . " " ; $amount = $amount + $a; }
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
1009.1 = 1,010 1009.6 = 1,010 1010.6 = 1,010 1012.1 = 1,010 1014.1 = 1,010 1016.6 = 1,020 1019.6 = 1,020 1023.1 = 1,020 1027.1 = 1,030 1031.6 = 1,030 1036.6 = 1,040 1042.1 = 1,040 1048.1 = 1,050 1054.6 = 1,050 1061.6 = 1,060 1069.1 = 1,070 1077.1 = 1,080 1085.6 = 1,090 1094.6 = 1,090 1104.1 = 1,100 1114.1 = 1,110 1124.6 = 1,120 1135.6 = 1,140 1147.1 = 1,150 1159.1 = 1,160 1171.6 = 1,170 1184.6 = 1,180 1198.1 = 1,200 1212.1 = 1,210 1226.6 = 1,230 1241.6 = 1,240 1257.1 = 1,260 1273.1 = 1,270 1289.6 = 1,290 1306.6 = 1,310 1324.1 = 1,320 1342.1 = 1,340 1360.6 = 1,360 1379.6 = 1,380
Output for hhvm-3.10.0

Process exited with code 153.