title: SoapClient error fallback in PHP
body: <p>In PHP, if you try to instantiate a new <a href="http://www.php.net/manual/en/class.soapclient.php" rel="noreferrer"><code>SoapClient</code></a>, and the WSDL is not accessible (server down or whatever), a PHP fatal error is thrown:</p>
  
  <blockquote>
    <p>Fatal error: SOAP-ERROR: Parsing WSDL:
    Couldn't load from
    '<a href="http://example.com/servlet/app/SomeService?wsdl" rel="noreferrer">http://example.com/servlet/app/SomeService?wsdl</a>'
    : failed to load external entity
    "<a href="http://example.com/servlet/app/SomeService?wsdl" rel="noreferrer">http://example.com/servlet/app/SomeService?wsdl</a>"</p>
  </blockquote>
  
  <p>Fatal errors in PHP, as far as I know, are not recoverable.</p>
  
  <p>Is there any way to fallback from this? Can this fatal error somehow be avoided?</p>
  
  <hr>
  
  <p><strong>Edit:</strong> I should say that I am running on PHP 5.2, if it makes any difference.</p>