summaryrefslogtreecommitdiff
path: root/ext/phar/tests/bug53872.phpt
blob: 2fc55d9155a95f3fa4bbd74b66c4afd01c4056c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--TEST--
bug#53872 (internal corruption of phar)
--SKIPIF--
<?php 
if (!extension_loaded("phar")) die("skip"); 
if (!extension_loaded("zlib")) die("skip Test needs ext/zlib"); 
?>
--INI--
phar.readonly=0
--FILE--
<?php
$p=new Phar('bug53872-phar.phar');
$p->buildFromDirectory(__DIR__ . "/bug53872/");
$p->setStub('<?php __HALT_COMPILER();?\>');
$p->compressFiles(Phar::GZ);

print(file_get_contents('phar://bug53872-phar.phar/first.txt'));
print(file_get_contents('phar://bug53872-phar.phar/second.txt'));
print(file_get_contents('phar://bug53872-phar.phar/third.txt'));
?>
--CLEAN--
<?php
unlink("bug53872-phar.phar");
?>
--EXPECT--
content of first.txt
content of third.txt