Home > PHP > Function > COM > variant_round()

variant_round()

variant_round - Rounds a variant to the specified number of decimal places

Syntax

mixed variant_round (mixed $variant, int $decimals)

Arguments

  • variant - The variant.
  • decimals - Number of decimal places.

Description

Returns the value of variant rounded to decimals decimal places.

Version

PHP 5

Return value

Returns the rounded value.