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--CLEAN-- 23<?php 24unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); 25unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); 26__halt_compiler(); 27?> 28--EXPECT-- 29bool(true) 30file contents 31this works 32