3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $sum=(0.5+0.2+0.2+0.1); $sum2 = 1; var_dump('$sum: ', $sum); var_dump('$sum2: ', $sum2); var_dump('$sum == $sum2: ', $sum==$sum2); var_dump('0.5+0.3+0.2+0.0', 0.5+0.3+0.2+0.0);
Output for 4.3.0 - 7.2.0
string(6) "$sum: " float(1) string(7) "$sum2: " int(1) string(15) "$sum == $sum2: " bool(false) string(15) "0.5+0.3+0.2+0.0" float(1)