Skip to content

Instantly share code, notes, and snippets.

@renebakx
Created February 8, 2016 09:29
Show Gist options
  • Save renebakx/fff95fc315b8f9013052 to your computer and use it in GitHub Desktop.
Save renebakx/fff95fc315b8f9013052 to your computer and use it in GitHub Desktop.
PHP 5 and 7 with MAMP
export PHP7=1; // on opening your terminal
// Goes in your ~/.bash_profile
if [ -z "$PHP7" ]; then
export DRUSH_PHP='/Applications/MAMP/bin/php/php7.0.0/bin/php'
export PATH=/Applications/MAMP/Library/bin/:/Applications/MAMP/bin/php/php7.0.0/bin/:~/bin:$JAVA_HOME/bin:$PATH
else
export DRUSH_PHP='/Applications/MAMP/bin/php/php5.5.26/bin/php'
export PATH=/Applications/MAMP/Library/bin/:/Applications/MAMP/bin/php/php5.5.26/bin/:~/bin:$JAVA_HOME/bin:$PATH
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment