Doc #79530 [NEW]: bcpowmod never returns NULL as stated in doc

From: Date: Mon, 27 Apr 2020 17:01:53 +0000
Subject: Doc #79530 [NEW]: bcpowmod never returns NULL as stated in doc
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17523@lists.php.net to get a copy of this message
From: mail at einargangso dot no Operating system: PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:bcpowmod never returns NULL as stated in doc Description: ------------ --- From manual page: https://www.php.net/manual/en/function.bcpowmod.php --- > Returns the result as a string, or NULL if modulus is 0 or exponent is negative. It never returns NULL, but false. https://3v4l.org/co5Ge Source: https://github.com/php/php-src/blob/master/ext/bcmath/bcmath.c#L365 Test script: --------------- <?php // modulus is 0 assert(is_bool(bcpowmod('2', '2', '0'))); // bcpowmod -> FALSE // exponent is negative assert(is_bool(bcpowmod('2', '-2', '2'))); // bcpowmod -> FALSE // Output proof var_dump(false === bcpowmod('2', '2', '0') && false === bcpowmod('2', '2', '0')); -- Edit bug report at https://bugs.php.net/bug.php?id=79530&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79530&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79530&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79530&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79530&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79530&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79530&r=support Expected behavior: https://bugs.php.net/fix.php?id=79530&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79530&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79530&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79530&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79530&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79530&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79530&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79530&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79530&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79530&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79530&r=mysqlcfg

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