1--TEST-- 2Phar and RecursiveDirectoryIterator 3--SKIPIF-- 4<?php 5if (!extension_loaded("phar")) die("skip"); 6if (!extension_loaded("spl")) die("skip SPL not available"); 7?> 8--INI-- 9phar.require_hash=0 10--FILE-- 11<?php 12 13require_once 'files/phar_oo_test.inc'; 14$fname = str_replace('\\', '/', $fname); 15 16$it = new RecursiveDirectoryIterator('phar://'.$fname); 17$it = new RecursiveIteratorIterator($it); 18 19foreach($it as $name => $ent) 20{ 21 var_dump(str_replace(array('\\', $fname), array('/', '*'), $name)); 22 var_dump(str_replace(array('\\', $fname), array('/', '*'), $ent->getPathname())); 23 var_dump(str_replace('\\', '/', $it->getSubPath())); 24 var_dump(str_replace('\\', '/', $it->getSubPathName())); 25 $sub = $it->getPathInfo(); 26 var_dump(str_replace('\\', '/', $sub->getFilename())); 27} 28 29?> 30===DONE=== 31--CLEAN-- 32<?php 33unlink(dirname(__FILE__) . '/files/phar_oo_005.phar.php'); 34__halt_compiler(); 35?> 36--EXPECT-- 37string(14) "phar://*/a.php" 38string(14) "phar://*/a.php" 39string(0) "" 40string(5) "a.php" 41string(20) "phar_oo_005.phar.php" 42string(16) "phar://*/b/c.php" 43string(16) "phar://*/b/c.php" 44string(1) "b" 45string(7) "b/c.php" 46string(1) "b" 47string(16) "phar://*/b/d.php" 48string(16) "phar://*/b/d.php" 49string(1) "b" 50string(7) "b/d.php" 51string(1) "b" 52string(14) "phar://*/b.php" 53string(14) "phar://*/b.php" 54string(0) "" 55string(5) "b.php" 56string(20) "phar_oo_005.phar.php" 57string(14) "phar://*/e.php" 58string(14) "phar://*/e.php" 59string(0) "" 60string(5) "e.php" 61string(20) "phar_oo_005.phar.php" 62===DONE=== 63