title: "Strict Standards: Only variables should be passed by reference" error
body: <p>I am trying to get an HTML-based recursive directory listing based on code here:</p>
  
  <p><a href="http://webdevel.blogspot.in/2008/06/recursive-directory-listing-php.html" rel="noreferrer">http://webdevel.blogspot.in/2008/06/recursive-directory-listing-php.html</a> </p>
  
  <p>Code runs fine but it throws some errors:</p>
  
  <blockquote>
    <p>Strict Standards: Only variables should be passed by reference in
    C:\xampp\htdocs\directory5.php on line 34</p>
    
    <p>Strict Standards: Only variables should be passed by reference in
    C:\xampp\htdocs\directory5.php on line 32</p>
    
    <p>Strict Standards: Only variables should be passed by reference in
    C:\xampp\htdocs\directory5.php on line 34</p>
  </blockquote>
  
  <p>Below is the excerpt of code:</p>
  
  <pre><code>else
    {
     // the extension is after the last "."
     $extension = strtolower(array_pop(explode(".", $value)));   //Line 32
  
     // the file name is before the last "."
     $fileName = array_shift(explode(".", $value));  //Line 34
  
     // continue to next item if not one of the desired file types
     if(!in_array("*", $fileTypes) &amp;&amp; !in_array($extension, $fileTypes)) continue;
  
     // add the list item
     $results[] = "&lt;li class=\"file $extension\"&gt;&lt;a href=\"".str_replace("\\", "/",     $directory)."/$value\"&gt;".$displayName($fileName, $extension)."&lt;/a&gt;&lt;/li&gt;\n";
    }
  </code></pre>