3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = 42.85 * 100 - 34.84 * 100; $b = (int)$a; $c = (int)round($a); var_dump($a, $b, $c); echo $a."\n".$b."\n".$c;
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.34, 8.3.0 - 8.3.35, 8.4.1 - 8.4.26, 8.5.0 - 8.5.11
float(800.9999999999995) int(800) int(801) 801 800 801
Output for 7.4.0 - 7.4.33
float(801) int(800) int(801) 801 800 801

preferences:
28.7 ms | 1139 KiB | 9 Q