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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Tue May 07 15:01:36 2024 UTC