The easiest way is to rewrite the alias. Just copy / paste cmd into the terminal for temporary use or write it to .bash_profile to make it permanent.
For MAMP
$ alias php=/applications/mamp/bin/php5.3/bin/php
For XAMPP
$ alias php=/Applications/XAMPP/bin/php
For AMPPS
$ alias php=/Applications/AMPPS/php-5.6/bin/php
Run php through our new alias
$ php -v
source share