#### Quick install PHP 7.0: ##### 1. Install depends PHP 7.0 $ brew install autoconf automake bison27 gd freetype t1lib mariadb gettext zlib mcrypt ##### 2. Configure PHP 7.0 $ git clone --depth=1 https://github.com/php/php-src.git $ cd php-src $ ./buildconf $ env YACC=`brew --prefix bison27`/bin/bison ./configure \ --prefix="/usr/local/opt/php7" \ --with-config-file-path="/usr/local/etc/php7" \ --enable-mbstring \ --enable-zip \ --enable-bcmath \ --enable-pcntl \ --enable-ftp \ --enable-exif \ --enable-calendar \ --enable-sysvmsg \ --enable-sysvsem \ --enable-sysvshm \ --enable-wddx \ --with-curl \ --with-iconv \ --with-gmp \ --with-gd \ --with-jpeg-dir=`brew --prefix gd` \ --with-png-dir=`brew --prefix gd` \ --with-freetype-dir=`brew --prefix freetype` \ --with-t1lib=`brew --prefix t1lib` \ --enable-gd-native-ttf \ --enable-gd-jis-conv \ --with-openssl \ --enable-mysqlnd \ --with-mysqli=mysqlnd \ --with-pdo-mysql=mysqlnd \ --with-mysql-sock=/tmp/mysql.sock \ --with-gettext=`brew --prefix gettext` \ --with-zlib=`brew --prefix zlib` \ --with-bz2 \ --with-mcrypt=`brew --prefix mcrypt` $ make -j `sysctl -n hw.logicalcpu_max` $ open -R . ---- #### Optional. Deploy OSX package (First step 2 finish) $ env INSTALL_ROOT=$PWD/php7-pkg make install $ pkgbuild \ --root php7-pkg \ --identifier org.denji.php7 \ --version 7.0.0 \ --ownership recommended \ PHP-7.0.0.pkg $ open -R PHP-7.0.0.pkg #### Install PHP 7.0 to `/usr/local/opt/php7` $ make install ---- #### Uninstall PHP 7.0 $ rm -rvf "/usr/local/opt/php7" $ rm -rvf "/usr/local/etc/php7" #### TODO 1. export `php.ini-{development,production}`, `php-fpm.ini`, `extensions ini`, `php.ini`, `fpm srcipt launchd` in /usr/local/etc/php7/ #### Links * [Packaging a daemon for OS X](http://vincent.bernat.im/en/blog/2013-autoconf-osx-packaging.html) * [PHP: mysqlnd saves 40% memory, finally](http://blog.ulf-wendel.de/2007/php-mysqlnd-saves-40-memory-finally-new-tuning-options/) ![2014-09-26 10 36 56](https://cloud.githubusercontent.com/assets/3759759/4417188/02cff008-4550-11e4-9a90-09e10fd0fd34.png)