Skip to content

Instantly share code, notes, and snippets.

@nabeelio
Last active July 8, 2019 18:17
Show Gist options
  • Save nabeelio/d46baf8daf6811243449b4e372ec8945 to your computer and use it in GitHub Desktop.
Save nabeelio/d46baf8daf6811243449b4e372ec8945 to your computer and use it in GitHub Desktop.
Install PHP on OSX
#!/bin/bash
# PHP Install Script
# Requires homebrew and phpbrew
# Minimum reqs for phpvms development
PHP_VERSION=7.3.7
# Prereqs
brew install bzip2 libzip libxml2 mhash mcrypt pcre autoconf
# Install PHP
phpbrew install $(PHP_VERSION) \
+default \
+bz2="$(brew --prefix bzip2)" \
+zlib="$(brew --prefix zlib)" \
+zip="$(brew --prefix libzip)" \
+debug \
+mysql \
+sqlite \
+fpm \
+pdo
phpbrew switch php-$(PHP_VERSION)
# Extensions
phpbrew ext install xdebug stable
# Composer, etc
phpbrew app get composer
phpbrew app get phpunit
echo "Done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment