2006-01-06 16:11:54 +00:00
|
|
|
--TEST--
|
|
|
|
Phar: phar:// file_get_contents
|
|
|
|
--SKIPIF--
|
|
|
|
<?php if (!extension_loaded("phar")) print "skip"; ?>
|
2007-01-08 23:03:41 +00:00
|
|
|
--INI--
|
|
|
|
phar.require_hash=0
|
2006-01-06 16:11:54 +00:00
|
|
|
--FILE--
|
|
|
|
<?php
|
2007-01-13 16:17:04 +00:00
|
|
|
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
|
|
|
|
$pname = 'phar://' . $fname;
|
2006-01-06 16:11:54 +00:00
|
|
|
$file = "<?php __HALT_COMPILER(); ?>";
|
|
|
|
|
2006-01-11 00:50:33 +00:00
|
|
|
$files = array();
|
|
|
|
$files['a.php'] = '<?php echo "This is a\n"; ?>';
|
|
|
|
$files['b.php'] = '<?php echo "This is b\n"; ?>';
|
|
|
|
$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
|
2006-01-06 16:11:54 +00:00
|
|
|
|
2007-01-13 16:17:04 +00:00
|
|
|
include 'phar_test.inc';
|
2006-01-06 16:11:54 +00:00
|
|
|
|
2007-01-13 16:17:04 +00:00
|
|
|
var_dump(file_get_contents($pname . '/a.php'));
|
|
|
|
var_dump(file_get_contents($pname . '/b.php'));
|
|
|
|
var_dump(file_get_contents($pname . '/b/c.php'));
|
2006-01-06 16:11:54 +00:00
|
|
|
|
|
|
|
?>
|
|
|
|
===DONE===
|
|
|
|
--CLEAN--
|
|
|
|
<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
|
|
|
|
--EXPECT--
|
|
|
|
string(28) "<?php echo "This is a\n"; ?>"
|
|
|
|
string(28) "<?php echo "This is b\n"; ?>"
|
|
|
|
string(30) "<?php echo "This is b/c\n"; ?>"
|
|
|
|
===DONE===
|