title: How to run a PHP script from the command line with MAMP?
body: <p>I have MAMP installed. Now I am trying to run a script from the command line, but I can't seem to get it to work.</p>
  
  <p>How should I set up my environment so that I can run a script from the command line and use the PHP version I installed with MAMP?</p>
  
  <p><strong>Update:</strong> I agree with jjeaton below, <a href="https://stackoverflow.com/questions/4262006/how-to-use-mamps-version-of-php-instead-of-the-default-on-osx">here is a nice solution</a> of creating an alias to MAMP's PHP:</p>
  
  <pre><code># add this to your ~/.bash_profile
  alias phpmamp='/Applications/MAMP/bin/php/php5.3.6/bin/php'
  </code></pre>
  
  <p>Now you can use it from the command line:</p>
  
  <pre><code>$ phpmamp --help
  </code></pre>