Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<SoapServer::getFunctionsSoapServer::handle>
^SoapServerLast updated: Mon, 26 Oct 2026

SoapServer::__getLastResponse

(PHP 8 >= 8.4)

SoapServer::__getLastResponse — Returns last SOAP response

Description

public function 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 trace option set to true.

Parameters

This function has no parameters.

Return Values

The last SOAP response, as an XML string.

Examples

Example #1 SoapServer::__getLastResponse() example

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

<SoapServer::getFunctionsSoapServer::handle>
^SoapServerLast updated: Mon, 26 Oct 2026