php modulo return wrong result

前端 未结 4 745
我寻月下人不归
我寻月下人不归 2021-01-14 07:42

I got problem with this code:

if (!empty($_GET[ \"lic\" ])) $lic = $_GET[ \"lic\" ]; else $e = true;
echo ($lic % 11);

When I post 89

4条回答
  •  梦谈多话
    2021-01-14 08:32

    This is most likely being caused because the number you're posting is higher than PHP_INT_MAX, which is 9223372036854775807 on most 64-bit systems AFAIK. If you're using a 32-bit system (which I expect you are), it's probably 2147483647.

提交回复
热议问题