title: Call SoapClient constructor with WSDL from a variable instead of a URL
body: <p>Is it possible to call the PHP SoapClient constructor, which takes a URL as an argument, with the contents of a string instead. </p>
  
  <p>In my example I have a manipulated DOMDocument containing WSDL which I would write into a string with saveXML(). </p>
  
  <p>The idea is to not touch the filesystem if possible. I have tried php://memory but tests on retrieving the stream content with functions like file_get_contents result in empty strings as I suspect the stream context has disappeared. Is there another way?</p>