xref: /PHP-8.0/ext/phar/tests/phar_oo_011.phpt (revision a555cc0b)
1--TEST--
2Phar object: add file
3--SKIPIF--
4<?php if (!extension_loaded('phar')) die('skip'); ?>
5--INI--
6phar.readonly=0
7phar.require_hash=0
8--FILE--
9<?php
10
11$pharconfig = 0;
12
13require_once 'files/phar_oo_test.inc';
14
15$phar = new Phar($fname);
16$phar->setInfoClass('SplFileObject');
17
18$phar['hi/f.php'] = 'hi';
19var_dump(isset($phar['hi']));
20var_dump(isset($phar['hi/f.php']));
21echo $phar['hi/f.php'];
22echo "\n";
23
24?>
25--CLEAN--
26<?php
27unlink(__DIR__ . '/files/phar_oo_011.phar.php');
28__halt_compiler();
29?>
30--EXPECT--
31bool(true)
32bool(true)
33hi
34