I have installed MAMP (comes with PHP 5.5) on my machine. And localhost pointed to /Applications/MAMP/htdocs. The problem happened when I was trying to use composer in termi
If you installed PHP 5.6 using Homebrew, this works:
Open Terminal, run open -a TextEdit ~/.bash_profile, then paste this in the end of the file:
# Use Home-brewed PHP 5.6 instead of pre-installed version (5.3)
export PATH="$(brew --prefix homebrew/php/php56)/bin:$PATH"
Save the file and restart Terminal.