3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(0.2 + 0.1 - 0.1); $a = 0.1 + 0.2; $a -= 0.1; $b = 0.2; var_dump(array($a == $b, $a - 0.2, $b - 0.2));
based on 1FfDg
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
float(0.2) array(3) { [0]=> bool(false) [1]=> float(2.7755575615629E-17) [2]=> float(0) }