title: PHP Soap request named parameters are sent as one parameter
body: <p>Firstly I would like to apologise if this issue has come up already in Stack Overflow but my googling did not manage to find it.</p>
  
  <p>I'm running on PHP 7.2 and have created a SoapClient to send RPC encoded requests to a Web Service.</p>
  
  <pre><code>$this-&gt;client = new \SoapClient('https://tsp.demo.sk.ee/dds.wsdl', [
      'soap_version' =&gt; SOAP_1_1,
      'cache_wsdl' =&gt; WSDL_CACHE_NONE,
      'trace' =&gt; true,
      'style' =&gt; SOAP_RPC,
      'use' =&gt; SOAP_ENCODED,
  ]);
  </code></pre>
  
  <p>I now tried to use this client to send a request to the <code>MobileAuthenticate</code> request and use named parameters to do it since I don't need to fill in all of the available parameters.</p>
  
  <pre><code>$params = [
      'CountryCode' =&gt; 'EE',
      'PhoneNo' =&gt; '+3xxxxxxxxxx',
      'Language' =&gt; 'ENG',
      'ServiceName' =&gt; 'Testimine',
      'MessageToDisplay' =&gt; 'Test Message',
      'SPChallenge' =&gt; '12345678901234567890',
      'MessagingMode' =&gt; 'asynchClientServer',
  ];
  
  
  try {
      $response = $this-&gt;client-&gt;MobileAuthenticate($params);
      dd($response);
  } catch (\SoapFault $e) {
      var_dump($e);
      var_dump($this-&gt;client-&gt;__getLastRequest());
      var_dump($this-&gt;client-&gt;__getLastResponse());
  }
  </code></pre>
  
  <p>I was getting back that the language code was incorrect but based on the Web Service documentation, it was. I then started examining the output of <code>$this-&gt;client-&gt;__getLastRequest()</code> and found out that the method call was taking the parameters in an ordered array fashion. It set the first parameter value as <code>Array</code>.</p>
  
  <p>I examined the <code>SoapFault</code> exception output and indeed, my named parameters were nested in another array</p>
  
  <pre><code>["args"]=&gt;
    array(2) {
      [0]=&gt;
      string(18) "MobileAuthenticate"
      [1]=&gt;
      array(1) {
          [0]=&gt;
        array(8) {
              ["IDCode"]=&gt;
          string(0) ""
              ["CountryCode"]=&gt;
          string(2) "EE"
              ["PhoneNo"]=&gt;
          string(12) "+3xxxxxxxxxx"
              ["Language"]=&gt;
          string(3) "ENG"
              ["ServiceName"]=&gt;
          string(9) "Testimine"
              ["MessageToDisplay"]=&gt;
          string(12) "Test Message"
              ["SPChallenge"]=&gt;
          string(20) "12345678901234567890"
              ["MessagingMode"]=&gt;
          string(18) "asynchClientServer"
        }
      }
    }
  </code></pre>
  
  <p>I've tried googling for similar issues and everything I found (even comments on php.net) show that this is the way to use named parameters, even most nowadays services expect the usage of named parameters.</p>
  
  <p>Several months back I worked on another project running on PHP 5.6 that also consumed a SOAP Web Service and that worked like a charm. SoapClient implementation-wise, the only difference I see is the PHP version.</p>
  
  <p>Am I missing something that has changed since PHP 7 that I can't see in the docs or I'm blindly not seeing the issue?</p>
  
  <p><strong>Small update:</strong> I was able to reproduce the issue on Homebrew compiled PHP 5.6, 7.0 and 7.2 as well as on Arch Linux compiled PHP 7.2.</p>