1--TEST-- 2Phar object: getContent() (verify it works with compression) 3--SKIPIF-- 4<?php if (!extension_loaded("phar")) die("skip"); ?> 5<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?> 6--INI-- 7phar.readonly=0 8--FILE-- 9<?php 10$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; 11$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.php'; 12 13$phar = new Phar($fname); 14$phar['a'] = 'file contents 15this works'; 16$phar['a']->compress(Phar::GZ); 17copy($fname, $fname2); 18$phar2 = new Phar($fname2); 19var_dump($phar2['a']->isCompressed()); 20echo $phar2['a']->getContent() . "\n"; 21?> 22===DONE=== 23--CLEAN-- 24<?php 25unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); 26unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); 27__halt_compiler(); 28?> 29--EXPECT-- 30bool(true) 31file contents 32this works 33===DONE=== 34