1--TEST--
2Phar: phar.cache_list basic read test
3--SKIPIF--
4<?php
5if (!extension_loaded("phar")) die("skip");
6if (version_compare(PHP_VERSION, "6.0", "!=")) die("skip Unicode support required");
7?>
8--INI--
9phar.cache_list={PWD}/files/nophar.phar
10--FILE--
11<?php
12$pname = 'phar://' . dirname(__FILE__) . '/files/nophar.phar';
13var_dump(file_get_contents($pname . '/b/c.php'));
14$a = opendir($pname);
15while (false !== ($b = readdir($a))) {
16var_dump($b);
17}
18foreach (new RecursiveIteratorIterator(new Phar($pname)) as $f) {
19	var_dump($f->getPathName());
20}
21var_dump(is_dir($pname . '/b'));
22var_dump(is_dir($pname . '/d'));
23var_dump(is_dir($pname . '/b/c.php'));
24?>
25===DONE===
26--EXPECTF--
27string(131) "<?php echo "in b\n";$a = fopen("index.php", "r", true);echo stream_get_contents($a);fclose($a);include dirname(__FILE__) . "/../d";"
28unicode(1) "b"
29unicode(1) "d"
30unicode(9) "index.php"
31unicode(7) "web.php"
32string(%d) "phar://%snophar.phar/b%cc.php"
33string(%d) "phar://%snophar.phar%cd"
34string(%d) "phar://%snophar.phar%cindex.php"
35string(%d) "phar://%snophar.phar%cweb.php"
36bool(true)
37bool(false)
38bool(false)
39===DONE===
40