title: Running CLI php script with execute bit
body: <p>This has been bugging me slightly.</p>
  
  <p>I know you can do </p>
  
  <pre><code>php foo.php
  </code></pre>
  
  <p>or </p>
  
  <pre><code>php -f foo.php
  </code></pre>
  
  <p>Is there no way to just launch a script with the execute bit set</p>
  
  <pre><code>./foo.php
  </code></pre>
  
  <p>Given the folowing:</p>
  
  <pre><code>#!/usr/bin/php
  
  &lt;?php 
  exit('hello');
  </code></pre>
  
  <p>I get "Could not open input file" or " bad interpreter: No such file or directory" depending on if there's whitespace after "bin/php".</p>