title: How to get JSON response from SOAP Call in PHP
body: <p>As SOAP client returns XML response by default, I need to get JSON response in return instead of XML.</p>
  
  <pre><code>$client = new SoapClient(null, array('location' =&gt; "http://localhost/soap.php",
                                       'uri'      =&gt; "http://test-uri/"));
  </code></pre>
  
  <p>In that case what attribute needs to be set in <a href="http://php.net/manual/en/class.soapclient.php" rel="nofollow">SOAPClient</a> or <a href="http://www.php.net/manual/en/class.soapheader.php" rel="nofollow">SOAPHeader</a> so that it returns JSON response?</p>