3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numbs = [1,2,50.2,5.43,1.22,1.9,10.999,-20.5,-15.8,-2.75]; foreach($numbs as $num) { $roundedNum = round($num - .25); echo $num . ' Rounded to ' . $roundedNum . "\n"; }
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
1 Rounded to 1 2 Rounded to 2 50.2 Rounded to 50 5.43 Rounded to 5 1.22 Rounded to 1 1.9 Rounded to 2 10.999 Rounded to 11 -20.5 Rounded to -21 -15.8 Rounded to -16 -2.75 Rounded to -3

preferences:
198.18 ms | 404 KiB | 291 Q