Doc #69349 [Asn]: Default value of $scale parameter wrong

From: Date: Sun, 20 Dec 2015 00:03:25 +0000
Subject: Doc #69349 [Asn]: Default value of $scale parameter wrong
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13008@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69349&edit=1 ID: 69349 Updated by: tpunt@php.net Reported by: cmb@php.net Summary: Default value of $scale parameter wrong Status: Assigned Type: Documentation Problem Package: BC math related Operating System: * PHP Version: Irrelevant Assigned To: tpunt Block user comment: N Private report: N New Comment: I've resolved this with commit: https://svn.php.net/viewvc?view=revision&revision=338333 It sets the default parameter for scale to 0 for the mentioned functions and updates the scale parameter description (&bc.scale.description;) to say that it firstly defaults to the value set by bcscale(), and then falls back to 0 if that isn't set. Previous Comments: ------------------------------------------------------------------------ [2015-12-20 00:00:28] tpunt@php.net Automatic comment from SVN on behalf of tpunt Revision: http://svn.php.net/viewvc/?view=revision&revision=338333 Log: Resolve doc bug #69349 ------------------------------------------------------------------------ [2015-04-01 19:37:29] sobak@php.net Automatic comment from SVN on behalf of sobak Revision: http://svn.php.net/viewvc/?view=revision&revision=336318 Log: Mandatory parameters don't have default values (partially fixes #69349) ------------------------------------------------------------------------ [2015-04-01 17:44:33] cmb@php.net bccomp(), bcmul(), bcpowmod() and bcsub() have the same issue. Furthermore some of the BC Math functions specify: string $left_operand = "" , string $right_operand = "" It doesn't seem to make much sense to give a default for a mandatory parameter. ------------------------------------------------------------------------ [2015-04-01 17:38:49] cmb@php.net Description: ------------ --- From manual page: http://www.php.net/function.bcdiv --- Part of the function signature is: [, int $scale = int ] That doesn't make much sense. The default is 0 or whatever has been set with bcscale(). ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69349&edit=1

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