1<?php
2
3$fname = dirname(__FILE__) . '/write3.phar';
4@unlink($fname);
5
6$phar = new Phar($fname);
7$phar->setStub('<?php
8clearstatcache();
9var_dump(file_exists("phar://" . __FILE__ . "/test"), is_dir("phar://" . __FILE__ . "/test"));
10rmdir("phar://" . __FILE__ . "/test");
11clearstatcache();
12var_dump(file_exists("phar://" . __FILE__ . "/test"), is_dir("phar://" . __FILE__ . "/test"));
13echo "ok\n";
14__HALT_COMPILER();
15?>');
16$phar->setMetadata('hi');
17$phar['test.txt'] = "hi
18";
19$phar['test.txt']->setMetadata('hi');
20$phar->addEmptyDir('test');
21?>
22