SoapServer::__getLastResponse

(PHP 8 >= 8.4)

SoapServer::__getLastResponseReturns last SOAP response

说明

public SoapServer::__getLastResponse(): ?string

Returns the XML sent in the last SOAP response.

注意: This method works only if the SoapServer object was created with the trace option set to true.

参数

此函数没有参数。

返回值

The last SOAP response, as an XML string.

示例

示例 #1 SoapServer::__getLastResponse() example

<?php
$server
= SoapServer("some.wsdl", ["trace" => 1]);
$server->handle();
echo
"Response:\n" . $server->__getLastResponse() . "\n";
?>