title: Strict standards, only variables should be passed PHP error
body: <p>I get the error "<em>Strict Standards: Only variables should be passed by reference in</em>" on line 18 and 20.</p>
  
  <p>Line 18:</p>
  
  <pre><code>$phpinfo[end(array_keys($phpinfo))][$match[2]] = isset($match[4]) ? array($match[3], $match[4]) : $match[3];
  </code></pre>
  
  <p>Line 20 is : <code>$phpinfo[end(array_keys($phpinfo))][] = $match[2];</code></p>
  
  <p>This is part of an installation script and this is the full php code snippet:</p>
  
  <pre><code>&lt;?php  
  
      ob_start();
      phpinfo(-1);
      $phpinfo = array('phpinfo' =&gt; array());
      if(preg_match_all('#(?:&lt;h2&gt;(?:&lt;a name=".*?"&gt;)?(.*?)(?:&lt;/a&gt;)?&lt;/h2&gt;)|(?:&lt;tr(?: class=".*?")?&gt;&lt;t[hd](?: class=".*?")?&gt;(.*?)\s*&lt;/t[hd]&gt;(?:&lt;t[hd](?: class=".*?")?&gt;(.*?)\s*&lt;/t[hd]&gt;(?:&lt;t[hd](?: class=".*?")?&gt;(.*?)\s*&lt;/t[hd]&gt;)?)?&lt;/tr&gt;)#s', ob_get_clean(), $matches, PREG_SET_ORDER))
      foreach($matches as $match){
          if(strlen($match[1]))
              $phpinfo[$match[1]] = array();
          elseif(isset($match[3]))
              $phpinfo[end(array_keys($phpinfo))][$match[2]] = isset($match[4]) ? array($match[3], $match[4]) : $match[3];
          else
              $phpinfo[end(array_keys($phpinfo))][] = $match[2];
      }
  </code></pre>
  
  <p>Many thanks for any help you guys can give me.</p>