xref: /PHP-8.3/ext/phar/tests/phar_oo_010.phpt (revision 74859783)
1--TEST--
2Phar object: ArrayAccess and isset
3--EXTENSIONS--
4phar
5--INI--
6phar.require_hash=0
7--FILE--
8<?php
9
10$pharconfig = 0;
11
12require_once 'files/phar_oo_test.inc';
13
14$phar = new Phar($fname);
15
16var_dump(isset($phar['a.php']));
17var_dump(isset($phar['b.php']));
18var_dump(isset($phar['b/c.php']));
19var_dump(isset($phar['b/d.php']));
20var_dump(isset($phar['e.php']));
21
22?>
23===DIR===
24<?php
25var_dump(isset($phar['b']));
26?>
27===NA===
28<?php
29var_dump(isset($phar['a']));
30var_dump(isset($phar['b/c']));
31var_dump(isset($phar[12]));
32var_dump(isset($phar['b']));
33
34?>
35--CLEAN--
36<?php
37unlink(__DIR__ . '/files/phar_oo_010.phar.php');
38__halt_compiler();
39?>
40--EXPECT--
41bool(true)
42bool(true)
43bool(true)
44bool(true)
45bool(true)
46===DIR===
47bool(true)
48===NA===
49bool(false)
50bool(false)
51bool(false)
52bool(true)
53