3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $float = 17.31; // Bedrag in centen $integer = intval($float * 100); $integer2 = (integer)($float*100); $remainder = $float*100-$integer; echo $float."\n"; echo $integer."\n"; echo $integer2."\n"; echo $remainder."\n";
based on VrA9B
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
17.31 1730 1730 0.99999999999977