1--TEST-- 2Phar: stream stat 3--SKIPIF-- 4<?php if (!extension_loaded("phar")) die("skip"); ?> 5--INI-- 6phar.require_hash=0 7detect_unicode=0 8--FILE-- 9<?php 10$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; 11$pname = 'phar://' . $fname; 12$file = b"<?php 13Phar::mapPhar('hio'); 14__HALT_COMPILER(); ?>"; 15 16$files = array(); 17$files['a'] = 'a'; 18$files['b/a'] = 'b'; 19$files['b/c/d'] = 'c'; 20$files['bad/c'] = 'd'; 21 22include 'files/phar_test.inc'; 23 24include $fname; 25 26$fp = fopen('phar://hio/a', 'r'); 27var_dump(fstat($fp)); 28fclose($fp); 29?> 30--CLEAN-- 31<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> 32--EXPECTF-- 33array(26) { 34 [0]=> 35 int(12) 36 [1]=> 37 int(%d) 38 [2]=> 39 int(33060) 40 [3]=> 41 int(1) 42 [4]=> 43 int(0) 44 [5]=> 45 int(0) 46 [6]=> 47 int(-1) 48 [7]=> 49 int(1) 50 [8]=> 51 int(%d) 52 [9]=> 53 int(%d) 54 [10]=> 55 int(%d) 56 [11]=> 57 int(-1) 58 [12]=> 59 int(-1) 60 [%sdev"]=> 61 int(12) 62 [%sino"]=> 63 int(%d) 64 [%smode"]=> 65 int(33060) 66 [%snlink"]=> 67 int(1) 68 [%suid"]=> 69 int(0) 70 [%sgid"]=> 71 int(0) 72 [%srdev"]=> 73 int(-1) 74 [%ssize"]=> 75 int(1) 76 [%satime"]=> 77 int(%d) 78 [%smtime"]=> 79 int(%d) 80 [%sctime"]=> 81 int(%d) 82 [%sblksize"]=> 83 int(-1) 84 [%sblocks"]=> 85 int(-1) 86} 87