Doc #67288 [Opn]: GMP functions accept strings in addition to resources
| From: | aharvey@php.net | Date: | Wed, 21 May 2014 17:37:58 +0000 |
| Subject: | Doc #67288 [Opn]: GMP functions accept strings in addition to resources | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-11232@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67288&edit=1
ID: 67288
Updated by: aharvey@php.net
Reported by: benjamin dot morel at gmail dot com
Summary: GMP functions accept strings in addition to
resources
Status: Open
Type: Documentation Problem
Package: Documentation problem
Operating System: Irrelevant
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
This is going to get even messier in PHP 5.6, since the resources are changing to objects.
We'll have to figure out the best way to document this.
Previous Comments:
------------------------------------------------------------------------
[2014-05-15 22:11:34] benjamin dot morel at gmail dot com
Please note that this needs to be fixed in all gmp_* functions, not just gmp_add().
------------------------------------------------------------------------
[2014-05-15 22:09:56] benjamin dot morel at gmail dot com
Description:
------------
The documentation for gmp_add() for example:
http://www.php.net/manual/en/function.gmp-add.php
Says about parameters:
> It can be either a GMP number resource, or a numeric string given that it is possible to
> convert the latter to a number.
So the function signature is wrong.
Expected result:
----------------
resource gmp_add ( resource|string $a , resource|string $b )
Actual result:
--------------
resource gmp_add ( resource $a , resource $b )
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67288&edit=1