php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #75217 gmp-sign parameter must be integer string
Submitted: 2017-09-17 16:26 UTC Modified: 2018-01-29 23:00 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: villascape at gmail dot com Assigned: vrana (profile)
Status: Closed Package: Documentation problem
PHP Version: 7.1.9 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: villascape at gmail dot com
New email:
PHP Version: OS:

 

 [2017-09-17 16:26 UTC] 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 />

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-01-29 23:00 UTC] vrana@php.net
Automatic comment from SVN on behalf of vrana
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=344085
Log: gmp_sign accepts only integers (bug #75217)
 [2018-01-29 23:00 UTC] vrana@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: vrana
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 01:01:33 2025 UTC