title: Setting PHP enviromental variable while running command line script
body: <p>I need to run a PHP script from command line and I need to set some environmental variables. Unfortunately, following does not work:</p>
  
  <pre><code>php -dAPPLICATION_ENV=staging script.php
  </code></pre>
  
  <p>What I'd like to accomplish is having <code>APPLICATION_ENV</code> variable set.</p>