3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo (int)((0.1 + 0.7) * 10) . "\n"; echo intval((0.1 + 0.7) * 10) . "\n"; echo (int)((0.1 + 0.7) * 20) . "\n"; echo (int)((0.1 + 0.8) * 20) . "\n"; echo (int)((0.1 + 0.8) * 10) . "\n"; $a = 0.1; $b = 0.7; echo intval(($a + $b) * 10) . "\n";
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
7 7 15 18 9 7