SoapClient::__getLastResponseHeaders

(PHP 5, PHP 7, PHP 8)

SoapClient::__getLastResponseHeadersReturns the SOAP headers from the last response

說(shuō)明

public SoapClient::__getLastResponseHeaders(): ?string

Returns the SOAP headers from the last response.

注意:

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

參數(shù)

此函數(shù)沒(méi)有參數(shù)。

返回值

The last SOAP response headers.

范例

示例 #1 SoapClient::__getLastResponse() example

<?php
$client 
SoapClient("some.wsdl", array('trace' => 1));
$result $client->SomeFunction();
echo 
"RESPONSE HEADERS:\n" $client->__getLastResponseHeaders() . "\n";
?>

參見(jiàn)