xref: /PHP-8.3/ext/phar/tests/bug53872.phpt (revision 74859783)
1--TEST--
2bug#53872 (internal corruption of phar)
3--EXTENSIONS--
4phar
5zlib
6--INI--
7phar.readonly=0
8--FILE--
9<?php
10$p=new Phar('bug53872-phar.phar');
11$p->buildFromDirectory(__DIR__ . "/bug53872/");
12$p->setStub('<?php __HALT_COMPILER();?\>');
13$p->compressFiles(Phar::GZ);
14
15print(file_get_contents('phar://bug53872-phar.phar/first.txt'));
16print(file_get_contents('phar://bug53872-phar.phar/second.txt'));
17print(file_get_contents('phar://bug53872-phar.phar/third.txt'));
18?>
19--CLEAN--
20<?php
21unlink("bug53872-phar.phar");
22?>
23--EXPECT--
24content of first.txt
25content of third.txt
26