3v4l.org

run code in 200+ 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 - 7.1.7
17.31 1730 1730 0.99999999999977