--TEST-- Bug #49278 (SoapClient::__getLastResponseHeaders returns NULL if wsdl operation !has output) --EXTENSIONS-- soap --INI-- soap.wsdl_cache_enabled=0 --SKIPIF-- --FILE-- 1]);' . <<<'PHP' function Add() {} $server->addFunction('Add'); $server->handle(); PHP; php_cli_server_start($code, null, $args); $client = new SoapClient(__DIR__ . '/bug49278.wsdl', array('location' => "http://".PHP_CLI_SERVER_ADDRESS, 'trace' => 1)); $client->Add(); var_dump($client->__getLastResponse()); var_dump($client->__getLastResponse()); var_dump($client->__getLastRequestHeaders()); var_dump($client->__getLastResponseHeaders()); ?> --EXPECTF-- string(0) "" string(0) "" string(%d) "POST / HTTP/1.1 Host: %s Connection: Keep-Alive User-Agent: PHP-SOAP/%s Content-Type: text/xml; charset=utf-8 SOAPAction: "Add" Content-Length: %d " string(%s) "HTTP/1.1 200 OK Host: %s Date: %s Connection: close X-Powered-By: PHP/%s Content-type: text/html; charset=UTF-8 "