$archive = new PharData('piwigo.tar'); $archive->buildFromDirectory('/piwigo/'); $archive->compress(Phar::GZ); # Compress as GZip