mirror of
https://github.com/php/php-src.git
synced 2024-12-17 22:09:12 +08:00
36 lines
814 B
PHP
36 lines
814 B
PHP
--TEST--
|
|
Phar: opendir test, root directory
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded("phar")) die("skip");
|
|
if (version_compare(PHP_VERSION, "6.0", "==")) die("skip pre-unicode version of PHP required");
|
|
?>
|
|
--INI--
|
|
phar.require_hash=0
|
|
--FILE--
|
|
<?php
|
|
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
|
|
$pname = 'phar://' . $fname;
|
|
$file = "<?php
|
|
Phar::mapPhar('hio');
|
|
__HALT_COMPILER(); ?>";
|
|
|
|
$files = array();
|
|
$files['a'] = 'a';
|
|
$files['b/a'] = 'b';
|
|
include 'files/phar_test.inc';
|
|
|
|
include $fname;
|
|
$dir = opendir('phar://hio/');
|
|
while (false !== ($a = readdir($dir))) {
|
|
var_dump($a);
|
|
var_dump(is_dir('phar://hio/' . $a));
|
|
}
|
|
?>
|
|
--CLEAN--
|
|
<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
|
|
--EXPECT--
|
|
string(1) "a"
|
|
bool(false)
|
|
string(1) "b"
|
|
bool(true)
|