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