diff options
Diffstat (limited to 'ext/phar/tests/cache_list/files/write5.phar.inc')
-rw-r--r-- | ext/phar/tests/cache_list/files/write5.phar.inc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ext/phar/tests/cache_list/files/write5.phar.inc b/ext/phar/tests/cache_list/files/write5.phar.inc new file mode 100644 index 0000000..5e7b9bb --- /dev/null +++ b/ext/phar/tests/cache_list/files/write5.phar.inc @@ -0,0 +1,29 @@ +<?php + +$fname = dirname(__FILE__) . '/write5.phar'; +@unlink($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$phar = new Phar(__FILE__); +$d = dirname(__FILE__) . "/copyonwrite5"; +mkdir($d); +file_put_contents($d . "/file1", "file1\n"); +file_put_contents($d . "/file2", "file2\n"); +$arr = $phar->buildFromDirectory($d); +ksort($arr); +var_dump($arr); +$phar2 = new Phar(__FILE__); +$arr = array(); +foreach ($phar2 as $name => $file) { + $arr[$name] = $file->getContent(); +} +ksort($arr); +foreach ($arr as $name => $content) { + echo $name, " ", $content; +} +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['hi'] = "hi\n"; +?> |