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--EXPECTF--
25string(131) "<?php echo "in b\n";$a = fopen("index.php", "r", true);echo stream_get_contents($a);fclose($a);include dirname(__FILE__) . "/../d";"
26string(1) "b"
27string(1) "d"
28string(9) "index.php"
29string(7) "web.php"
30string(%d) "phar://%snophar.phar/b%cc.php"
31string(%d) "phar://%snophar.phar%cd"
32string(%d) "phar://%snophar.phar%cindex.php"
33string(%d) "phar://%snophar.phar%cweb.php"
34bool(true)
35bool(false)
36bool(false)
37