xref: /PHP-5.6/ext/phar/tests/ini_set.phpt (revision e29bccaa)
1--TEST--
2Phar: test ini_set with readonly and require_hash enabled
3--SKIPIF--
4<?php
5if (!extension_loaded("phar")) die("skip");
6?>
7--INI--
8phar.require_hash=1
9phar.readonly=1
10--FILE--
11<?php
12var_dump(ini_set('phar.require_hash', 1));
13var_dump(ini_set('phar.readonly', 1));
14var_dump(ini_get('phar.require_hash'));
15var_dump(ini_get('phar.readonly'));
16if (version_compare(PHP_VERSION, "5.3", "<")) {
17var_dump(false, false);
18} else {
19var_dump(ini_set('phar.require_hash', 0));
20var_dump(ini_set('phar.readonly', 0));
21}
22var_dump(ini_get('phar.require_hash'));
23var_dump(ini_get('phar.readonly'));
24__HALT_COMPILER();
25?>
26--EXPECTF--
27%unicode|string%(1) "1"
28%unicode|string%(1) "1"
29%unicode|string%(1) "1"
30%unicode|string%(1) "1"
31bool(false)
32bool(false)
33%unicode|string%(1) "1"
34%unicode|string%(1) "1"
35