php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #64801 gmp_testbit Return Values text inaccurate
Submitted: 2013-05-09 16:10 UTC Modified: 2013-06-25 00:28 UTC
From: phpbugs at personal dot formauri dot es Assigned: philip (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2013-05-09 16:10 UTC] phpbugs at personal dot formauri dot es
Description:
------------
The Return Values of the gmp_testbit() function reads:

Returns TRUE on success or FALSE on failure.

Judging by the examples, that is incorrect. The function seems to return TRUE if the tested bit is 1, and FALSE if it is 0.

(It is a bit of a stretch to consider a failure for a number to have a bit set to zero in the given position.)



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-06-25 00:28 UTC] philip@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: philip
 [2013-06-25 00:28 UTC] philip@php.net
This is now fixed in SVN, as per:

Revision: http://svn.php.net/viewvc/?view=revision&revision=330636
Log: Clarified return value as suggested in PHP Bug #64832

Thank you for the bug report. :)

Source: http://lxr.php.net/xref/PHP_5_4/ext/gmp/gmp.c#1511
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 04:01:30 2024 UTC