1--TEST-- 2Phar: url stat 3--SKIPIF-- 4<?php if (!extension_loaded("phar")) die("skip"); ?> 5--INI-- 6phar.require_hash=0 7--FILE-- 8<?php 9$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; 10$pname = 'phar://' . $fname; 11$file = b"<?php 12Phar::mapPhar('hio'); 13__HALT_COMPILER(); ?>"; 14 15$pfile = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; 16$files = array(); 17$files['a'] = 'a'; 18$files['b/a'] = 'b'; 19$files['b/c/d'] = 'c'; 20$files['bad/c'] = 'd'; 21include 'files/phar_test.inc'; 22include $fname; 23 24var_dump(stat('phar://hio/a'), stat('phar://hio/b')); 25?> 26--CLEAN-- 27<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> 28--EXPECTF-- 29array(26) { 30 [0]=> 31 int(12) 32 [1]=> 33 int(%d) 34 [2]=> 35 int(33060) 36 [3]=> 37 int(1) 38 [4]=> 39 int(0) 40 [5]=> 41 int(0) 42 [6]=> 43 int(-1) 44 [7]=> 45 int(1) 46 [8]=> 47 int(%d) 48 [9]=> 49 int(%d) 50 [10]=> 51 int(%d) 52 [11]=> 53 int(-1) 54 [12]=> 55 int(-1) 56 [%sdev"]=> 57 int(12) 58 [%sino"]=> 59 int(%d) 60 [%smode"]=> 61 int(33060) 62 [%snlink"]=> 63 int(1) 64 [%suid"]=> 65 int(0) 66 [%sgid"]=> 67 int(0) 68 [%srdev"]=> 69 int(-1) 70 [%ssize"]=> 71 int(1) 72 [%satime"]=> 73 int(%d) 74 [%smtime"]=> 75 int(%d) 76 [%sctime"]=> 77 int(%d) 78 [%sblksize"]=> 79 int(-1) 80 [%sblocks"]=> 81 int(-1) 82} 83array(26) { 84 [0]=> 85 int(12) 86 [1]=> 87 int(%d) 88 [2]=> 89 int(16749) 90 [3]=> 91 int(1) 92 [4]=> 93 int(0) 94 [5]=> 95 int(0) 96 [6]=> 97 int(-1) 98 [7]=> 99 int(0) 100 [8]=> 101 int(%d) 102 [9]=> 103 int(%d) 104 [10]=> 105 int(%d) 106 [11]=> 107 int(-1) 108 [12]=> 109 int(-1) 110 [%sdev"]=> 111 int(12) 112 [%sino"]=> 113 int(%d) 114 [%smode"]=> 115 int(16749) 116 [%snlink"]=> 117 int(1) 118 [%suid"]=> 119 int(0) 120 [%sgid"]=> 121 int(0) 122 [%srdev"]=> 123 int(-1) 124 [%ssize"]=> 125 int(0) 126 [%satime"]=> 127 int(%d) 128 [%smtime"]=> 129 int(%d) 130 [%sctime"]=> 131 int(%d) 132 [%sblksize"]=> 133 int(-1) 134 [%sblocks"]=> 135 int(-1) 136}