1--TEST--
2import_request_variables() test (overwrite super-globals)
3--GET--
4GET=0&POST=1&COOKIE=2&FILES=3&REQUEST=4
5--POST--
6GET=5&POST=6&COOKIE=7&FILES=8&REQUEST=9
7--COOKIE--
8GET=10;POST=11;COOKIE=12;FILES=13;REQUEST=14
9--INI--
10variables_order=CGP
11--FILE--
12<?php
13
14import_request_variables("gpc", "_");
15var_dump($_GET, $_POST, $_COOKIE, $_FILES, $_REQUEST);
16
17echo "Done\n";
18?>
19--EXPECTF--
20Warning: import_request_variables(): Attempted super-global (_GET) variable overwrite in %s on line %d
21
22Warning: import_request_variables(): Attempted super-global (_POST) variable overwrite in %s on line %d
23
24Warning: import_request_variables(): Attempted super-global (_COOKIE) variable overwrite in %s on line %d
25
26Warning: import_request_variables(): Attempted super-global (_FILES) variable overwrite in %s on line %d
27
28Warning: import_request_variables(): Attempted super-global (_REQUEST) variable overwrite in %s on line %d
29
30Warning: import_request_variables(): Attempted super-global (_GET) variable overwrite in %s on line %d
31
32Warning: import_request_variables(): Attempted super-global (_POST) variable overwrite in %s on line %d
33
34Warning: import_request_variables(): Attempted super-global (_COOKIE) variable overwrite in %s on line %d
35
36Warning: import_request_variables(): Attempted super-global (_FILES) variable overwrite in %s on line %d
37
38Warning: import_request_variables(): Attempted super-global (_REQUEST) variable overwrite in %s on line %d
39
40Warning: import_request_variables(): Attempted super-global (_GET) variable overwrite in %s on line %d
41
42Warning: import_request_variables(): Attempted super-global (_POST) variable overwrite in %s on line %d
43
44Warning: import_request_variables(): Attempted super-global (_COOKIE) variable overwrite in %s on line %d
45
46Warning: import_request_variables(): Attempted super-global (_FILES) variable overwrite in %s on line %d
47
48Warning: import_request_variables(): Attempted super-global (_REQUEST) variable overwrite in %s on line %d
49array(5) {
50  ["GET"]=>
51  string(1) "0"
52  ["POST"]=>
53  string(1) "1"
54  ["COOKIE"]=>
55  string(1) "2"
56  ["FILES"]=>
57  string(1) "3"
58  ["REQUEST"]=>
59  string(1) "4"
60}
61array(5) {
62  ["GET"]=>
63  string(1) "5"
64  ["POST"]=>
65  string(1) "6"
66  ["COOKIE"]=>
67  string(1) "7"
68  ["FILES"]=>
69  string(1) "8"
70  ["REQUEST"]=>
71  string(1) "9"
72}
73array(5) {
74  ["GET"]=>
75  string(2) "10"
76  ["POST"]=>
77  string(2) "11"
78  ["COOKIE"]=>
79  string(2) "12"
80  ["FILES"]=>
81  string(2) "13"
82  ["REQUEST"]=>
83  string(2) "14"
84}
85array(0) {
86}
87array(5) {
88  ["GET"]=>
89  string(1) "5"
90  ["POST"]=>
91  string(1) "6"
92  ["COOKIE"]=>
93  string(1) "7"
94  ["FILES"]=>
95  string(1) "8"
96  ["REQUEST"]=>
97  string(1) "9"
98}
99Done
100