NotionCommotion Posted September 17, 2017 Share Posted September 17, 2017 Why am I getting this error? I see no mention that the argument must be an integer in http://php.net/manual/en/function.gmp-sign.php. I am using PHP7. Thanks <?php ini_set('display_errors', 1); echo gmp_sign('1'); echo gmp_sign('1.1'); 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 /> Quote Link to comment Share on other sites More sharing options...
ginerjm Posted September 17, 2017 Share Posted September 17, 2017 Your arguments are not integers. As the message says. Although this doesn't look like it is on line 6. I'll let you figure out why your arguments are not integers. Quote Link to comment Share on other sites More sharing options...
Barand Posted September 17, 2017 Share Posted September 17, 2017 Despite the manual specifying "number" it would appear that the parameter must be either an integer or a string representation of an integer. No floats. Quote Link to comment Share on other sites More sharing options...
NotionCommotion Posted September 17, 2017 Author Share Posted September 17, 2017 Yeah Barand, I suspected that, but didn't want to come out and say there was an error in the manual. http://php.net/manual/en/language.types.php describes both numbers and integers, and http://php.net/manual/en/function.gmp-sign.php means integers but says numbers. Albeit small, I will report it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.