Doc #77152 [Opn->Nab]: In the documentation says it returns 0.5 but when I did tests returns 0

From: Date: Wed, 14 Nov 2018 14:09:53 +0000
Subject: Doc #77152 [Opn->Nab]: In the documentation says it returns 0.5 but when I did tests returns 0
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16138@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77152&edit=1 ID: 77152 Updated by: cmb@php.net Reported by: naspter at gmail dot com Summary: In the documentation says it returns 0.5 but when I did tests returns 0 -Status: Open +Status: Not a bug Type: Documentation Problem -Package: Math related +Package: BC math related Operating System: Windows 10 PHP Version: 7.2.12 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: You need to set a scale greater than 0 like in the example in the docs, see <https://3v4l.org/Bi8sU>. Previous Comments: ------------------------------------------------------------------------ [2018-11-14 12:30:14] naspter at gmail dot com Description: ------------ --- From manual page: https://php.net/function.bcmod --- var_dump(bcmod('4', '3.5')); var_dump(fmod('4', '3.5')); var_dump('4'%'3.5'); >= PHP 7.2.* 0 0.5 1 < PHP 7.2.0 1 0.5 1 Test script: --------------- var_dump(bcmod('4', '3.5')); var_dump(fmod('4', '3.5')); var_dump('4'%'3.5'); >= PHP 7.2.* 0 0.5 1 < PHP 7.2.0 1 0.5 1 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=77152&edit=1

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