Do you phpbrew?
By Ian Mustafa.
phpbrew builds and installs multiple version php(s) in your $HOME directory.
Follow this guide. Make sure you've meet these requirements.
Most of the time, I build PHP with this variants.
phpbrew -d install 7.0.21 +default +mysql +sqlite +pdo +debug +exif +iconv +intl +mcrypt +sessionAs Mcrypt extension has been deprecated in PHP 7.1 in favour of OpenSSL, you may remove +mcrypt variant when building.
phpbrew -d install 7.1.7 +default +mysql +sqlite +pdo +debug +exif +iconv +intl +sessionAs of late July 2017, PHP 7.2 is available as Beta 1. You can install it from the GitHub tag.
phpbrew -d install github:php/[email protected] as php-7.2.0-beta +default +mysql +sqlite +pdo +debug +exif +iconv +intl +session +fpmPlease note for macOS users, you may need to install bison and valgrind with brew and link bison with brew link.
Image processing extensions like GD and Imagick aren't added by default. So we can add them using ext option. Please note that those flags in GD installation command are required to enable the FreeType Support (please change the directory accordingly).
phpbrew ext install gd -- --enable-gd-native-ttf --with-freetype-dir=/usr/local/opt/freetype/include/freetype2/
phpbrew ext install imagickphpbrew has a nice wiki andcookbook. Go check out!
- Fix errors when building PHP 5.6.14 (or any version) with phpbrew on macOS
Sometimes we've had to linkreadlinewithbrew link.