title: How can execute php scripts in bash?
body: <p>I need parse uri in shell scripts. So, I tried to use php in bash as below.</p>
  
  <pre><code>#!/bin/sh
  
  uri="http://www.google.com?key=value
  key="host"
  
  value=$(php -r "$parse = parse_url('$uri'); echo $parse['$key']")
  </code></pre>
  
  <p>It has showing the following error.</p>
  
  <pre><code>PHP Parse error:  syntax error, unexpected '=' in Command line code on line 1
  </code></pre>
  
  <p>Some body can help how to use embedded php in bash ?</p>