3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $original = 4189.94; $int = (int) round($original * 100); $float = $original * 100; var_dump($int); //should be 418,994 ?? var_dump($float); //should be 418,994 ?? $double = $int / 100; // should be 4189.94 again ?? var_dump($double); var_dump($double == $original);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
int(418994) float(418994) float(4189.94) bool(true)