Skip to content

Instantly share code, notes, and snippets.

@Krule
Created February 15, 2011 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Krule/828221 to your computer and use it in GitHub Desktop.
Save Krule/828221 to your computer and use it in GitHub Desktop.
PHP Class for debugging SOAP requests
<?php
class SoapClientDebug extends SoapClient
{
public function __doRequest($request, $location="", $action="", $version=0, $one_way=0) {
echo "<pre>" . preg_replace('/&gt;&lt;/', '&gt;<br>&lt;', htmlentities($request)) . "</pre>";
return parent::__doRequest($request, $location, $action, $version);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment