$ xcode-select --install
$ softwareupdate --list
$ sudo apachectl stop
$ sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null
$ brew install httpd
$ sudo brew services start httpd
$ vim /usr/local/etc/httpd/httpd.conf
$ brew install mariadb
$ brew services start mariadb
$ /usr/local/Cellar/mariadb/10.2.9/bin/mysql_secure_installation
$ xcode-select --install
$ brew tap homebrew/homebrew-php
$ brew options php70
$ brew install php70 --with-homebrew-curl --with-httpd
$ vim /usr/local/etc/php/7.0/php.ini
Check this line is added to httpd.conf
LoadModule php7_module /usr/local/Cellar/php70/7.0.24_16/libexec/apache2/libphp7.so
$ brew install php70-apcu php70-xdebug php70-imagick
$ brew install --build-from-source php70-opcache
$ brew install --build-from-source php70-intl
$ brew install --build-from-source php70-mcrypt