xref: /PHP-8.2/ext/phar/tests/phar_oo_011.phpt (revision 74859783)
1--TEST--
2Phar object: add file
3--EXTENSIONS--
4phar
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