title: PHP - file_put_contents() doesn't preserve filenames in output
body: <p>I would like to compress a .csv file on my server and put it into .gz (gzip) file using PHP.</p>
  
  <p>I used `file_put_contents() like below:</p>
  
  <pre><code>$input = "test.csv";
  $output = $input.".gz";
  
  file_put_contents("compress.zlib://$output", file_get_contents($input));
  </code></pre>
  
  <p>However, when I open the gzip file (using winrar / 7zip), file extension is missing in the .gz archive; it's just "<strong>test</strong>" (without the file extension)?</p>
  
  <p>It's not showing "<strong>test.csv</strong>" as I wanted. How to fix it?</p>