How can I check whether the server is able to handle SOAP requests

phpqa.in picture phpqa.in · May 25, 2012 · Viewed 44.9k times · Source

How can I check whether the server is able to handle SOAP requests at run time ? I need to verify it before my script is executing.

Answer

Epoc picture Epoc · Sep 15, 2012

You can use:

if (extension_loaded('soap')) {
  // Do things
}

http://php.net/manual/en/function.extension-loaded.php