title: Cannot convert stdClass to String in PHP using C# web service
body: <p>So, I know this question has been asked a lot but I'm doing as much research as I can and I can't find an answer that's worked for me yet.</p>
  
  <p>I have a C# web service for a project and as a demo I'm trying to do stuff like this:</p>
  
  <pre><code>[WebMethod]
  public string GetResponse(string input)
  {
      return "You entered " + input + ".";
  }
  </code></pre>
  
  <p>And in PHP:</p>
  
  <pre><code>&lt;?php
      $client = new SoapClient("http://localhost:49283/MyService.asmx?wsdl");
      $client-&gt;GetResponse("hello");
  ?&gt;
  </code></pre>
  
  <p>Return value looks like this when you invoke it using the web service's home page (URL is <code>http://localhost:49283/BookService.asmx/GetResponse?input=hello</code>):</p>
  
  <pre><code>&lt;string xmlns="http://tempuri.org/"&gt;You entered hello.&lt;/string&gt;
  </code></pre>
  
  <p>Doing a <code>var_dump</code> of the response looks like this:</p>
  
  <p><code>object(stdClass)#2 (1) { ["GetResponseResult"]=&gt; string(13) "You entered ." }</code></p>
  
  <p>So I know it has a string <i>inside</i> it, but I have no idea how to "extract" it out of the object. Can anyone help with this?</p>