3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $d = 0.30; do { $d = round($d - 0.01, 2); var_dump($d); } while ($d >= 0.00);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
float(0.29) float(0.28) float(0.27) float(0.26) float(0.25) float(0.24) float(0.23) float(0.22) float(0.21) float(0.2) float(0.19) float(0.18) float(0.17) float(0.16) float(0.15) float(0.14) float(0.13) float(0.12) float(0.11) float(0.1) float(0.09) float(0.08) float(0.07) float(0.06) float(0.05) float(0.04) float(0.03) float(0.02) float(0.01) float(0) float(-0.01)