title: matching multiple file extensions with fnmatch()
body: <p>In the typical file matching code:</p>
  
  <pre><code>while (false !== ($file = readdir($handle))) {
      if ($file !== "." &amp;&amp; $file !== ".." &amp;&amp; fnmatch($mask, $file)) {
          $dirList[] = $file;
      }
  }
  </code></pre>
  
  <p>I was trying to use a multiple file extension pattern like this:</p>
  
  <pre><code>$mask = "*.{jpg,png,gif}";
  </code></pre>
  
  <p>but it doesn't work. No files match. This is rather strange since the same pattern works just fine in a terminal. It also works perfectly well with glob(), returning the files I want. I know there's nothing wrong with the rest of the code because using "*.jpg" as mask also works with fnmatch. Wasn't fnmatch supposed to support the same patterns that are available in a shell?</p>