(PHP 8 >= 8.4)
SoapServer::__getLastResponse — Returns last SOAP response
public SoapServer::__getLastResponse(): ?string
Returns the XML sent in the last SOAP response.
Note: This method works only if the SoapServer object was created with the
traceoption set totrue.
This function has no parameters.
The last SOAP response, as an XML string.
Example #1 SoapServer::__getLastResponse() example
<?php
$server = SoapServer("some.wsdl", ["trace" => 1]);
$server->handle();
echo "Response:\n" . $server->__getLastResponse() . "\n";
?>
© 1997–2025 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/soapserver.getlastresponse.php