From 945112faad25136483d0ff91600c289c65329062 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Fri, 16 Jan 2009 15:37:00 +0000 Subject: [PATCH] round() mode parameter git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@273644 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/math/constants.xml | 22 +++++++++++++++++- reference/math/functions/round.xml | 37 +++++++++++++++++++++++++++++- 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/reference/math/constants.xml b/reference/math/constants.xml index 7cfe6afa5c..e371aebcaf 100644 --- a/reference/math/constants.xml +++ b/reference/math/constants.xml @@ -1,5 +1,5 @@ - + &reftitle.constants; &extension.constants.core; @@ -100,6 +100,26 @@ 0.57721566490153286061 Euler constant [5.2.0] + + PHP_ROUND_HALF_UP + 1 + Round halves up [5.3.0] + + + PHP_ROUND_HALF_DOWN + 2 + Round halves down [5.3.0] + + + PHP_ROUND_HALF_EVEN + 3 + Round halves to even numbers [5.3.0] + + + PHP_ROUND_HALF_ODD + 4 + Round halves to odd numbers [5.3.0] + diff --git a/reference/math/functions/round.xml b/reference/math/functions/round.xml index 1b52185e36..0ce628b9c2 100644 --- a/reference/math/functions/round.xml +++ b/reference/math/functions/round.xml @@ -1,5 +1,5 @@ - + round @@ -11,6 +11,7 @@ floatround floatval intprecision + intmodePHP_ROUND_HALF_UP Returns the rounded value of val to @@ -72,6 +73,17 @@ + + mode + + + One of PHP_ROUND_HALF_UP, + PHP_ROUND_HALF_DOWN, + PHP_ROUND_HALF_EVEN, or + PHP_ROUND_HALF_ODD. + + + @@ -103,6 +115,29 @@ echo round(5.055, 2); // 5.06 + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 5.3.0 + + The mode parameter was introduced. + + + + + + + &reftitle.seealso;