I am trying that now. I noticed that it has no impact on whatever version of PHP installed. If you want to invoke the MAMP-installed PHP on a script, you have to type the full path to the MAMP php5 executable:
/Applications/MAMP/bin/php5/bin/php myscript.php