Doc #67288 [Opn->Wfx]: GMP functions accept strings in addition to resources

From: Date: Sun, 01 Jun 2014 21:55:13 +0000
Subject: Doc #67288 [Opn->Wfx]: GMP functions accept strings in addition to resources
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-11255@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 +Status: Wont fix Type: Documentation Problem Package: Documentation problem Operating System: Irrelevant PHP Version: Irrelevant Block user comment: N Private report: N New Comment: PhD won't really let us do the resource|GMP|integer|string syntax (even if it was a good idea, which it probably isn't with that many types), and I'd rather not go with "mixed" here. I've changed these to "GMP" as part of the prep for PHP 5.6.0, but I think that's about the best we can do. Previous Comments: ------------------------------------------------------------------------ [2014-05-21 17:37:57] aharvey@php.net 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. ------------------------------------------------------------------------ [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

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