1--TEST-- 2Phar object: entry & openFile() 3--SKIPIF-- 4<?php if (!extension_loaded("phar")) die("skip"); ?> 5--INI-- 6phar.require_hash=0 7--FILE-- 8<?php 9 10require_once 'files/phar_oo_test.inc'; 11 12$phar = new Phar($fname); 13$phar->setInfoClass(); 14foreach($phar as $name => $ent) 15{ 16 var_dump($ent->getFilename()); 17 if ($ent->isDir()) { 18 var_dump('DIR'); 19 } else { 20 var_dump($ent->openFile()->fgets()); 21 include $ent->getPathName(); 22 } 23} 24 25?> 26===DONE=== 27--CLEAN-- 28<?php 29unlink(dirname(__FILE__) . '/files/phar_oo_003.phar.php'); 30__halt_compiler(); 31?> 32--EXPECTF-- 33string(5) "a.php" 34string(32) "<?php echo "This is a.php\n"; ?>" 35This is a.php 36string(1) "b" 37%s(3) "DIR" 38string(5) "b.php" 39string(32) "<?php echo "This is b.php\n"; ?>" 40This is b.php 41string(5) "e.php" 42string(32) "<?php echo "This is e.php\n"; ?>" 43This is e.php 44===DONE=== 45