xref: /PHP-8.3/tests/basic/022.phpt (revision 95e1a415)
1--TEST--
2Cookies test#1
3--INI--
4max_input_vars=1000
5filter.default=unsafe_raw
6--COOKIE--
7cookie1=val1  ; cookie2=val2%20; cookie3=val 3.; cookie 4= value 4 %3B; cookie1=bogus; %20cookie1=ignore;+cookie1=ignore;cookie1;cookie  5=%20 value; cookie%206=���;cookie+7=;$cookie.8;cookie-9=1;;;- & % $cookie 10=10
8--FILE--
9<?php
10var_dump($_COOKIE);
11?>
12--EXPECT--
13array(12) {
14  ["cookie1"]=>
15  string(6) "val1  "
16  ["cookie2"]=>
17  string(5) "val2 "
18  ["cookie3"]=>
19  string(6) "val 3."
20  ["cookie_4"]=>
21  string(10) " value 4 ;"
22  ["%20cookie1"]=>
23  string(6) "ignore"
24  ["+cookie1"]=>
25  string(6) "ignore"
26  ["cookie__5"]=>
27  string(7) "  value"
28  ["cookie%206"]=>
29  string(3) "���"
30  ["cookie+7"]=>
31  string(0) ""
32  ["$cookie_8"]=>
33  string(0) ""
34  ["cookie-9"]=>
35  string(1) "1"
36  ["-_&_%_$cookie_10"]=>
37  string(2) "10"
38}
39