3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $cena = 175210; $pogp = 50; function my_round($arg, $base){ $ost = $arg%$base; $chast = floor($arg/$base); if($ost >= $base/2) $rez = ($chast+1) * $base; else $rez = $chast * $base; return $rez; } echo "cena $cena pogp $pogp " . my_round($cena, $pogp); ?>
Output for 4.3.0 - 7.1.0
cena 175210 pogp 50 175200