xref: /PHP-8.0/ext/phar/tests/files/blog.phar.inc (revision f8d79582)
1<?php
2
3$fname = dirname(__FILE__) . '/blog.phar';
4@unlink($fname);
5
6$phar = new Phar($fname);
7$phar->setStub('<?php
8Phar::interceptFileFuncs();
9if(file_exists(dirname(__FILE__) . "/files/config.xml")) {
10    Phar::mount("config.xml", dirname(__FILE__) . "/files/config.xml");
11}
12Phar::webPhar("blog", "index.php");
13__HALT_COMPILER(); ?>');
14$phar['index.php'] = '<?php if (!file_exists("config.xml")) {
15    include "install.php";
16    exit;
17}
18var_dump(str_replace("\r\n", "\n", file_get_contents("config.xml")));
19?>';
20$phar['install.php'] = '<?php echo "install\n"; ?>';
21
22?>
23