1<?php 2$phar = new Phar(__FILE__); 3$d = dirname(__FILE__) . "/copyonwrite6"; 4mkdir($d); 5file_put_contents($d . "/file1", "file1\n"); 6file_put_contents($d . "/file2", "file2\n"); 7$arr = $phar->buildFromIterator(new RecursiveDirectoryIterator($d, RecursiveDirectoryIterator::SKIP_DOTS),$d); 8$arr = $phar->buildFromDirectory($d); 9ksort($arr); 10var_dump($arr); 11$phar2 = new Phar(__FILE__); 12$arr = array(); 13foreach ($phar2 as $name => $file) { 14 $arr[$name] = $file->getContent(); 15} 16ksort($arr); 17foreach ($arr as $name => $content) { 18 echo $name, " ", $content; 19} 20echo "ok\n"; 21__HALT_COMPILER(); ?> 220hi�p�Izzo�hi 23Ϭ�BE��@�x%�C�crGBMB