1--TEST--
2Phar object: iterate test with sub-directories and RecursiveIteratorIterator
3--SKIPIF--
4<?php if (!extension_loaded('phar')) die('skip'); ?>
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===DONE===
22--CLEAN--
23<?php
24unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
25__halt_compiler();
26?>
27--EXPECTF--
28string(%d) "phar://%sphar_dir_iterate.phar.php%canother.file.txt"
29string(%d) "phar://%sphar_dir_iterate.phar.php/sub%ctop.txt"
30string(%d) "phar://%sphar_dir_iterate.phar.php%ctop.txt"
31===DONE===
32