How to enable GMP in PHP on OS X?

Using OS X 10.11.1 (El Capitan) and PHP 5.5.29.

I would like to add the GMP extension to my PHP, but I do not know how to do this. According to the PHP manual, I am supposed to compile PHP with the option --with-gmp=dir . But I don’t know how to compile PHP (I doubt that I have ever done this on this machine, I just came with PHP by default), and I don’t know which dir to use with this parameter --with-gmp= .

I have Homebrew and I noticed a rather old old similar question , however this does not seem to work (the package is no longer available).

I noticed that there is something in brew called homebrew/php/php55-gmp , but that says something with brew tap . I have no idea what it is, and I would prefer not to spoil my Homebrew configuration or my entire development environment (I think this is unlikely, but I have no idea what I do with my system when I communicate with this material) .

+5
source share
1 answer

RocketNuts you can just do:

 brew install homebrew/php/php55-gmp 

That is all I have done.

+11
source

Source: https://habr.com/ru/post/1235069/


All Articles