Doc #54272 [Opn->Bgs]: round only take 2 parameters

From: Date: Wed, 16 Mar 2011 13:15:39 +0000
Subject: Doc #54272 [Opn->Bgs]: round only take 2 parameters
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-6081@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=54272&edit=1 ID: 54272 Updated by: salathe@php.net Reported by: rsalmon at mbpgroup dot com Summary: round only take 2 parameters -Status: Open +Status: Bogus Type: Documentation Problem Package: Documentation problem Operating System: all PHP Version: 5.2.17 Block user comment: N Private report: N New Comment: See the Changelog section on that page[1], which states: "5.3.0 The mode parameter was introduced." [1] http://php.net/manual/en/function.round.php Previous Comments: ------------------------------------------------------------------------ [2011-03-16 13:52:56] rsalmon at mbpgroup dot com Description: ------------ The documentation doesn't mention that the 3rd parameter only works with php 5.3+ Test script: --------------- <?php echo round(9.5, 0, PHP_ROUND_HALF_UP); Expected result: ---------------- 10 Actual result: -------------- Notice: Use of undefined constant PHP_ROUND_HALF_UP - assumed 'PHP_ROUND_HALF_UP' in test.php on line 2 Warning: Wrong parameter count for round() in test.php on line 2 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=54272&edit=1

« previous php.doc.bugs (#6081) next »