mirror of
https://github.com/php/php-src.git
synced 2024-10-04 00:06:16 +00:00
26 lines
572 B
PHP
26 lines
572 B
PHP
--TEST--
|
|
Phar object: getContent()
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
|
<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
|
|
--INI--
|
|
phar.readonly=0
|
|
--FILE--
|
|
<?php
|
|
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
|
|
|
|
$phar = new Phar($fname);
|
|
$phar['a'] = 'file contents
|
|
this works';
|
|
echo $phar['a']->getContent() . "\n";
|
|
?>
|
|
===DONE===
|
|
--CLEAN--
|
|
<?php
|
|
unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
|
|
__halt_compiler();
|
|
?>
|
|
--EXPECT--
|
|
file contents
|
|
this works
|
|
===DONE===
|