--TEST-- Bug #73182 (PHP SOAPClient does not support stream context HTTP headers in array form) --EXTENSIONS-- soap --SKIPIF-- --FILE-- 'http://' . PHP_CLI_SERVER_ADDRESS, 'uri' => 'misc-uri', 'trace' => true, 'stream_context' => stream_context_create([ 'http' => [ 'header' => [ // These 2 must be ignored because the soap http client sets them up 'Connection: close', 'User-Agent: bar', // The following 2 must be included 'X-custom: foo', 'Content-Description: Foo', ' X-custom2: trim me ', ], ], ]), ]); $client->__soapCall("foo", []); echo $client->__getLastRequestHeaders(); ?> --EXPECTF-- POST / HTTP/1.1 Host: localhost:%d Connection: Keep-Alive User-Agent: PHP-SOAP/%s Content-Type: text/xml; charset=utf-8 SOAPAction: "misc-uri#foo" Content-Length: %d X-custom: foo Content-Description: Foo X-custom2: trim me