1--TEST--
2Phar object: iterate test with sub-directories and RecursiveIteratorIterator
3--EXTENSIONS--
4phar
5--INI--
6phar.readonly=0
7phar.require_hash=0
8--FILE--
9<?php
10$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php';
11
12$phar = new Phar($fname);
13$phar['top.txt'] = 'hi';
14$phar['sub/top.txt'] = 'there';
15$phar['another.file.txt'] = 'wowee';
16$newphar = new Phar($fname);
17foreach (new RecursiveIteratorIterator($newphar) as $path => $obj) {
18    var_dump($obj->getPathName());
19}
20?>
21--CLEAN--
22<?php
23unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
24__halt_compiler();
25?>
26--EXPECTF--
27string(%d) "phar://%sphar_dir_iterate.phar.php%canother.file.txt"
28string(%d) "phar://%sphar_dir_iterate.phar.php/sub%ctop.txt"
29string(%d) "phar://%sphar_dir_iterate.phar.php%ctop.txt"
30