3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $v1 = number_format(10.51 + 10.52 + 10.53, 16); $v2 = number_format(31.56, 16); var_dump($v1, $v2, $v1 == $v2);
based on H079U
Output for 4.3.0 - 4.3.4, 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(19) "31.5600000000000023" string(19) "31.5599999999999987" bool(false)
Output for 4.3.5 - 5.2.17
string(19) "31.5599999999999987" string(19) "31.5599999999999987" bool(true)