Search Results

  1. Returns the XML sent in the last SOAP request. Note: This method works only if the SoapClient object was created with the trace option set to true.

  2. Jan 16, 2026 · Working with SOAP web services in PHP often involves using the built-in `SoapClient` class. While powerful, debugging SOAP requests and responses can be frustrating—especially when the `__getLastRequest()` method returns `null` when you need it most. This common issue leaves developers in the dark about what’s being sent to the server or received in return, slowing down troubleshooting. In ...

  3. Returns the XML sent in the last SOAP request. Note: This method works only if the SoapClient object was created with the trace option set to true.

  4. This method works only if the SoapClient object was created with the trace option set to true.

  5. SoapClient::__getLastRequest (PHP 5, PHP 7) SoapClient::__getLastRequest — Returns last SOAP request Description public SoapClient::__getLastRequest ( ) : string Returns the XML sent in the last SOAP request. Note: This method works only if the SoapClient object was created with the trace option set to true.

  6. People also ask

  7. Simple usage example of `SoapClient::__getLastRequest ()`. The `SoapClient::__getLastRequest ()` function is a built-in PHP function that returns the XML string of the most recent SOAP request made using the SoapClient class.