1--TEST--
2ini_get_all() tests
3--INI--
4pcre.jit=1
5pcre.backtrack_limit=1000000
6pcre.recursion_limit=100000
7--SKIPIF--
8<?php if (!extension_loaded("reflection")) die("skip"); ?>
9<?php
10if (ini_get("pcre.jit") === FALSE) {
11	die("skip no jit built");
12}
13?>
14--FILE--
15<?php
16
17var_dump(gettype(ini_get_all()));
18var_dump(ini_get_all(""));
19var_dump(ini_get_all("nosuchextension"));
20var_dump(ini_get_all("reflection"));
21var_dump(ini_get_all("pcre"));
22var_dump(ini_get_all("pcre", false));
23var_dump(ini_get_all("reflection", false));
24
25var_dump(ini_get_all("", ""));
26
27echo "Done\n";
28?>
29--EXPECTF--
30string(5) "array"
31
32Warning: ini_get_all(): Unable to find extension '' in %s on line %d
33bool(false)
34
35Warning: ini_get_all(): Unable to find extension 'nosuchextension' in %s on line %d
36bool(false)
37array(0) {
38}
39array(3) {
40  ["pcre.backtrack_limit"]=>
41  array(3) {
42    ["global_value"]=>
43    string(7) "1000000"
44    ["local_value"]=>
45    string(7) "1000000"
46    ["access"]=>
47    int(7)
48  }
49  ["pcre.jit"]=>
50  array(3) {
51    ["global_value"]=>
52    string(1) "1"
53    ["local_value"]=>
54    string(1) "1"
55    ["access"]=>
56    int(7)
57  }
58  ["pcre.recursion_limit"]=>
59  array(3) {
60    ["global_value"]=>
61    string(6) "100000"
62    ["local_value"]=>
63    string(6) "100000"
64    ["access"]=>
65    int(7)
66  }
67}
68array(3) {
69  ["pcre.backtrack_limit"]=>
70  string(7) "1000000"
71  ["pcre.jit"]=>
72  string(1) "1"
73  ["pcre.recursion_limit"]=>
74  string(6) "100000"
75}
76array(0) {
77}
78
79Warning: ini_get_all(): Unable to find extension '' in %sini_get_all.php on line %d
80bool(false)
81Done
82