Get your Mac OS X Development Environment up and running.
Sources:
This is pretty much a summarized version of the steps set out in the above URLs. This works in OS X Sierra and OS X High Sierra.
$ xcode-select --install
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew doctor
$ brew install httpd
$ brew install php
$ pecl uninstall -r xdebug && install xdebug
$ brew install git
$ brew install composer
$ brew cask install java
$ sudo brew services start httpd
$ sudo brew services start php
Edit the configuration files and replace [username] with your Mac OS X username. Also, change [domain].[ext] with the domain and extension you wish to use.
After you edit the configuration files, copy them to their corresponding folders:
$ cp httpd.conf /usr/local/etc/httpd/httpd.conf
$ cp httpd-vhosts.conf /usr/local/etc/httpd/extra/httpd-vhosts.conf
$ sudo cp hosts /etc/hosts
$ sudo mkdir ~/Sites
$ sudo mkdir ~/Sites/logs
Get the latest version here. I tried installing MySQL with Homebrew but, apparently, the current tap version is incompatible with php 7.2.7 (update 1/11/2020 - still haven't upgraded MySQL). I did not try installing MariaDB, although I agree with the above-referenced guides that updating via Homebrew is recommended.
IMPORTANT: COPY AND PASTE THE GENERATED ROOT PASSWORD TO CHANGE IT LATER
$ mysql -u root -p
Use the password generated by the MySQL install in Step 6.1.
Change MyNewPass for your new, easier to remember, password.
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';