2005-12-11 07:25:30 +00:00
--TEST--
2006-01-01 23:05:42 +00:00
Phar: opendir test - no dir specified at all
2005-12-11 07:25:30 +00:00
--SKIPIF--
2008-08-01 13:36:19 +00:00
<?php
if (!extension_loaded("phar")) die("skip");
if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
?>
2007-01-08 23:03:41 +00:00
--INI--
phar.require_hash=0
2005-12-11 07:25:30 +00:00
--FILE--
<?php
2007-01-21 16:58:23 +00:00
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
$pname = 'phar://' . $fname;
2008-08-01 13:36:19 +00:00
$file = "<?php
2006-01-11 00:50:33 +00:00
Phar::mapPhar('hio');
2008-08-01 13:36:19 +00:00
var_dump(__FILE__);
var_dump(substr(__FILE__, 0, 4) != 'phar');
2005-12-11 07:25:30 +00:00
__HALT_COMPILER(); ?>";
2006-01-11 00:50:33 +00:00
$files = array();
$files['a'] = 'abc';
2008-02-20 13:11:40 +00:00
include 'files/phar_test.inc';
2006-01-11 00:50:33 +00:00
2008-08-01 13:36:19 +00:00
include $pname;
2005-12-11 07:25:30 +00:00
$dir = opendir('phar://hio');
?>
2006-01-04 16:43:42 +00:00
--CLEAN--
<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
2005-12-11 07:25:30 +00:00
--EXPECTF--
2008-08-01 13:36:19 +00:00
string(%d) "%s017.phar.php"
bool(true)
2008-04-14 15:58:12 +00:00
Warning: opendir(phar://hio): failed to open dir: phar error: no directory in "phar://hio", must have at least phar://hio/ for root directory (always use full path to a new phar)
phar url "phar://hio" is unknown in %s017.php on line %d