For example, PHP5.5 is upgraded to PHP5.6.
For example, PHP5.5 is upgraded to PHP5.6.
Just reinstall it with brew
You can just use brew
to install it quickly and easily as the people above said. Of course, you can also download, compile and install it yourself. I have installed php7 before and it is OK. You can try it
<code>wget http://.../php-7.0.2.tar.gz tar zxvf php-7.0.2.tar.gz && cd php-7.0.2 phpize ./configure --prefix=/usr/local/php--mandir=/usr/share/man --infodir=/usr/share/info --with-apxs2=/usr/sbin/apxs--with-config-file-path=/usr/local/php/etc --enable-cli --with-curl --with-bz2--with-zlib --with-zlib-dir --with-mcrypt --enable-pdo --with-MySQL=mysqlnd--with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-openssl --with-imap-ssl--enable-exif --enable-zip --enable-ftp --enable-soap --enable-sockets--with-curlwrappers --with-gettext --with-pear --enable-calendar--enable-mbstring --enable-bcmath --with-mhash --with-iconv-dir --with-libxml-dir--enable-safe-mode --enable-mbregex --enable-fpm --with-freetype-dir --with-gd--with-jpeg-dir --with-png-dir --with-xmlrpc --enable-gd-native-ttf--enable-xml --enable-sysvsem --enable-sqlite-utf8 --with-xsl--enable-zend-multibyte --with-pcre-regex --with-pgsql --with-pdo-pgsql make && sudo make install sudo cp php.ini-development /usr/local/php/php.ini</code>
Newly install the Mac OSX developer environment and use homebrew to build PHP, Nginx, MySQL, Redis, Memcache... (LNMP development environment)
Just find the PHP part and install it. It works in my own test!
After brew is installed, ln -s ⋯⋯/bin/php /usr/local/bin/php