2005-12-12 06:17:16 +00:00
|
|
|
--TEST--
|
2006-01-01 23:05:42 +00:00
|
|
|
Phar: stream stat
|
2005-12-12 06:17:16 +00:00
|
|
|
--SKIPIF--
|
|
|
|
<?php if (!extension_loaded("phar")) print "skip"; ?>
|
2007-01-08 23:03:41 +00:00
|
|
|
--INI--
|
|
|
|
phar.require_hash=0
|
2005-12-12 06:17:16 +00:00
|
|
|
--FILE--
|
|
|
|
<?php
|
2007-01-13 16:17:04 +00:00
|
|
|
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
|
|
|
|
$pname = 'phar://' . $fname;
|
2005-12-12 06:17:16 +00:00
|
|
|
$file = "<?php
|
2006-01-11 00:50:33 +00:00
|
|
|
Phar::mapPhar('hio');
|
2005-12-12 06:17:16 +00:00
|
|
|
__HALT_COMPILER(); ?>";
|
2006-01-11 00:50:33 +00:00
|
|
|
|
|
|
|
$files = array();
|
|
|
|
$files['a'] = 'a';
|
|
|
|
$files['b/a'] = 'b';
|
|
|
|
$files['b/c/d'] = 'c';
|
|
|
|
$files['bad/c'] = 'd';
|
|
|
|
|
2007-01-13 16:17:04 +00:00
|
|
|
include 'phar_test.inc';
|
|
|
|
|
|
|
|
include $fname;
|
|
|
|
|
2005-12-12 06:17:16 +00:00
|
|
|
$fp = fopen('phar://hio/a', 'r');
|
|
|
|
var_dump(fstat($fp));
|
|
|
|
fclose($fp);
|
|
|
|
?>
|
2006-01-04 16:43:42 +00:00
|
|
|
--CLEAN--
|
|
|
|
<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
|
2005-12-12 06:17:16 +00:00
|
|
|
--EXPECTF--
|
|
|
|
array(26) {
|
|
|
|
[0]=>
|
2006-01-01 21:43:14 +00:00
|
|
|
int(12)
|
2005-12-12 06:17:16 +00:00
|
|
|
[1]=>
|
2007-01-20 23:12:28 +00:00
|
|
|
int(%d)
|
2005-12-12 06:17:16 +00:00
|
|
|
[2]=>
|
|
|
|
int(33060)
|
|
|
|
[3]=>
|
|
|
|
int(1)
|
|
|
|
[4]=>
|
|
|
|
int(0)
|
|
|
|
[5]=>
|
|
|
|
int(0)
|
|
|
|
[6]=>
|
|
|
|
int(-1)
|
|
|
|
[7]=>
|
|
|
|
int(1)
|
|
|
|
[8]=>
|
|
|
|
int(%d)
|
|
|
|
[9]=>
|
|
|
|
int(%d)
|
|
|
|
[10]=>
|
|
|
|
int(%d)
|
|
|
|
[11]=>
|
|
|
|
int(-1)
|
|
|
|
[12]=>
|
|
|
|
int(-1)
|
|
|
|
["dev"]=>
|
2006-01-01 21:43:14 +00:00
|
|
|
int(12)
|
2005-12-12 06:17:16 +00:00
|
|
|
["ino"]=>
|
2007-01-20 23:12:28 +00:00
|
|
|
int(%d)
|
2005-12-12 06:17:16 +00:00
|
|
|
["mode"]=>
|
|
|
|
int(33060)
|
|
|
|
["nlink"]=>
|
|
|
|
int(1)
|
|
|
|
["uid"]=>
|
|
|
|
int(0)
|
|
|
|
["gid"]=>
|
|
|
|
int(0)
|
|
|
|
["rdev"]=>
|
|
|
|
int(-1)
|
|
|
|
["size"]=>
|
|
|
|
int(1)
|
|
|
|
["atime"]=>
|
|
|
|
int(%d)
|
|
|
|
["mtime"]=>
|
|
|
|
int(%d)
|
|
|
|
["ctime"]=>
|
|
|
|
int(%d)
|
|
|
|
["blksize"]=>
|
|
|
|
int(-1)
|
|
|
|
["blocks"]=>
|
|
|
|
int(-1)
|
|
|
|
}
|