title: call_user_func_array() passes array as string bug?
body: <p>I'm using PHP 5.4.25. Take the following code:</p>
  
  <pre><code>&lt;?php
  
  function works($params=[])
  {
      var_dump(is_array($params));
      var_dump($params);
  
      $params = (array) $params;
  
      var_dump(is_array($params));
      var_dump($params);
  
      $params['first_name'] = "Bob";
  }
  
  function fails($params=[])
  {
      var_dump(is_array($params));
      var_dump($params);
  
      $params['first_name'] = "Bob";
  }
  
  call_user_func_array('works', ['first_name'=&gt;'John', 'last_name'=&gt;'Doe']);
  call_user_func_array('fails', ['first_name'=&gt;'John', 'last_name'=&gt;'Doe']);
  </code></pre>
  
  <p>Results:</p>
  
  <pre><code>bool(false)
  
  string(4) "John"
  
  bool(true)
  
  array(1) {
    [0] =&gt;
    string(4) "John"
  }
  
  bool(false)
  
  string(4) "John"
  
  PHP Warning:  Illegal string offset 'name' in /vhosts/site/test.php on line 14
  PHP Stack trace:
  PHP   1. {main}() /vhosts/site/test.php:0
  PHP   2. call_user_func_array() /vhosts/site/test.php:17
  PHP   3. fails() /vhosts/site/test.php:17
  </code></pre>
  
  <p>It appears that the array passed is not a valid array... It shows only the first value of the array and as a string instead of an array... But you can then cast the string as an array and then it works fine..... </p>
  
  <p>The solution is obviously to just cast it as an array at the beginning of the function, but it seems like you shouldn't have to do this. Is this a PHP bug? I can't seem to find any other reports of this.</p>