PHP Configuration for GMP and Large Number Arithmetic

依然范特西╮ 提交于 2020-01-06 02:38:10

问题


I'm using PHP to do some of the problems on projecteuler.net, but I have found that with my current installation of PHP, I cannot compute numbers long or large enough to do some of the problems.

Some initial research on Stackoverflow and through Google has told me that I must install an extension to PHP in order to do math with very large numbers. One such extension that was suggested is GMP, but I am not entirely sure how to configure my PHP installation to use GMP.

I am currently running Windows 7 64-bit with an installation of XAMPP (I think the version is 2.5). Is there a way to configure my current PHP build to work with GMP? How?!


回答1:


First try the bc extension. I believe that comes pre-installed on XAMPP. If that doesn't work, the requirements for GMP are here and the instructions are here.



来源:https://stackoverflow.com/questions/6670783/php-configuration-for-gmp-and-large-number-arithmetic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!