1--TEST-- 2Bug #69279 (Compressed ZIP Phar extractTo() creates garbage files) 3--EXTENSIONS-- 4phar 5zlib 6--INI-- 7phar.readonly=0 8--FILE-- 9<?php 10$w = new Phar(__DIR__ . "/bug69279.phar.zip"); 11$w["bug69279.txt"] = "Sample content."; 12$w->compressFiles(Phar::GZ); 13unset($w); 14 15$r = new Phar(__DIR__ . "/bug69279.phar.zip"); 16var_dump($r["bug69279.txt"]->isCompressed()); 17 18$r->extractTo(__DIR__, NULL, TRUE); 19var_dump(file_get_contents(__DIR__ . "/bug69279.txt")); 20?> 21--EXPECT-- 22bool(true) 23string(15) "Sample content." 24--CLEAN-- 25<?php 26@unlink(__DIR__ . "/bug69279.txt"); 27@unlink(__DIR__ . "/bug69279.phar.zip"); 28?> 29