Annotation of embedaddon/php/ext/phar/tests/cache_list/files/write6.phar, revision 1.1.1.1
1.1 misho 1: <?php
2: $phar = new Phar(__FILE__);
3: $d = dirname(__FILE__) . "/copyonwrite6";
4: mkdir($d);
5: file_put_contents($d . "/file1", "file1\n");
6: file_put_contents($d . "/file2", "file2\n");
7: $arr = $phar->buildFromIterator(new RecursiveDirectoryIterator($d, RecursiveDirectoryIterator::SKIP_DOTS),$d);
8: $arr = $phar->buildFromDirectory($d);
9: ksort($arr);
10: var_dump($arr);
11: $phar2 = new Phar(__FILE__);
12: $arr = array();
13: foreach ($phar2 as $name => $file) {
14: $arr[$name] = $file->getContent();
15: }
16: ksort($arr);
17: foreach ($arr as $name => $content) {
18: echo $name, " ", $content;
19: }
20: echo "ok\n";
21: __HALT_COMPILER(); ?>
22: 0 &