SoapClient::__getLastResponseHeaders
PHP function
Edit on GitHub ✎
(PHP 5, PHP 7, PHP 8)
Returns the SOAP headers from the last response
Description
SoapClient::__getLastResponseHeaders(): string|null
Returns the SOAP headers from the last response.
Note
This function only works if the SoapClient object was created with the trace option set to true.
Parameters Parameters
Return Values
The last SOAP response headers.
Examples
SoapClient::__getLastResponse() example
php
<?php
$client = new SoapClient("some.wsdl", array('trace' => 1));
$result = $client->SomeFunction();
echo "RESPONSE HEADERS:\n" . $client->__getLastResponseHeaders() . "\n";
?>See Also
SoapClient::__getLastRequestHeadersSoapClient::__getLastRequestSoapClient::__getLastResponse