xref: /PHP-7.0/tests/basic/022.phpt (revision bc8e8b34)
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(10) {
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  ["cookie__5"]=>
23  string(7) "  value"
24  ["cookie_6"]=>
25  string(3) "���"
26  ["cookie_7"]=>
27  string(0) ""
28  ["$cookie_8"]=>
29  string(0) ""
30  ["cookie-9"]=>
31  string(1) "1"
32  ["-_&_%_$cookie_10"]=>
33  string(2) "10"
34}
35