Annotation of embedaddon/php/ext/phar/tests/ini_set_off.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Phar: test ini_set with readonly and require_hash disabled
3: --SKIPIF--
4: <?php
5: if (!extension_loaded("phar")) die("skip");
6: if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of PHP required");
7: ?>
8: --INI--
9: phar.require_hash=0
10: phar.readonly=0
11: --FILE--
12: <?php
13: var_dump(ini_set('phar.require_hash', 1));
14: var_dump(ini_set('phar.readonly', 1));
15: var_dump(ini_get('phar.require_hash'));
16: var_dump(ini_get('phar.readonly'));
17: ini_set('phar.require_hash', 0);
18: ini_set('phar.readonly', 0);
19: var_dump(Phar::canWrite());
20: ?>
21: yes
22: <?php
23: var_dump(ini_set('phar.require_hash', 'yes'));
24: var_dump(ini_set('phar.readonly', 'yes'));
25: var_dump(ini_get('phar.require_hash'));
26: var_dump(ini_get('phar.readonly'));
27: var_dump(Phar::canWrite());
28: ini_set('phar.require_hash', 0);
29: ini_set('phar.readonly', 0);
30: ?>
31: on
32: <?php
33: var_dump(ini_set('phar.require_hash', 'on'));
34: var_dump(ini_set('phar.readonly', 'on'));
35: var_dump(ini_get('phar.require_hash'));
36: var_dump(ini_get('phar.readonly'));
37: var_dump(Phar::canWrite());
38: ini_set('phar.require_hash', 0);
39: ini_set('phar.readonly', 0);
40: ?>
41: true
42: <?php
43: var_dump(ini_set('phar.require_hash', 'true'));
44: var_dump(ini_set('phar.readonly', 'true'));
45: var_dump(Phar::canWrite());
46: var_dump(ini_get('phar.require_hash'));
47: var_dump(ini_get('phar.readonly'));
48: ?>
49: 0
50: <?php
51: var_dump(ini_set('phar.require_hash', 0));
52: var_dump(ini_set('phar.readonly', 0));
53: var_dump(Phar::canWrite());
54: var_dump(ini_get('phar.require_hash'));
55: var_dump(ini_get('phar.readonly'));
56: ?>
57: ===DONE===
58: --EXPECT--
59: string(1) "0"
60: string(1) "0"
61: string(1) "1"
62: string(1) "1"
63: bool(true)
64: yes
65: string(1) "0"
66: string(1) "0"
67: string(3) "yes"
68: string(3) "yes"
69: bool(false)
70: on
71: string(1) "0"
72: string(1) "0"
73: string(2) "on"
74: string(2) "on"
75: bool(false)
76: true
77: string(1) "0"
78: string(1) "0"
79: bool(false)
80: string(4) "true"
81: string(4) "true"
82: 0
83: string(4) "true"
84: string(4) "true"
85: bool(true)
86: string(1) "0"
87: string(1) "0"
88: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>