Doc #75217 [Opn->Csd]: gmp-sign parameter must be integer string
| From: | vrana@php.net | Date: | Mon, 29 Jan 2018 23:00:16 +0000 |
| Subject: | Doc #75217 [Opn->Csd]: gmp-sign parameter must be integer string | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-15381@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75217&edit=1
ID: 75217
Updated by: vrana@php.net
Reported by: villascape at gmail dot com
Summary: gmp-sign parameter must be integer string
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: 7.1.9
-Assigned To:
+Assigned To: vrana
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2018-01-29 23:00:11] vrana@php.net
Automatic comment from SVN on behalf of vrana
Revision: http://svn.php.net/viewvc/?view=revision&revision=344085
Log: gmp_sign accepts only integers (bug #75217)
------------------------------------------------------------------------
[2017-09-17 16:26:36] villascape at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.gmp-sign
---
Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric
string provided that it is possible to convert the latter to a number.
Manual says number but should say integer.
Test script:
---------------
<?php
ini_set('display_errors', 1);
echo gmp_sign('1');
echo gmp_sign('1.1');
Expected result:
----------------
11.1
Actual result:
--------------
1<br />
<b>Warning</b>: gmp_sign(): Unable to convert variable to GMP - string is not an
integer in <b>/var/www/public/noname2.php</b> on line <b>6</b><br />r
/>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75217&edit=1