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