1--TEST--
2Test session_decode() function : variation
3--EXTENSIONS--
4session
5--SKIPIF--
6<?php include('skipif.inc'); ?>
7--FILE--
8<?php
9
10ob_start();
11
12echo "*** Testing session_decode() : variation ***\n";
13
14var_dump(session_start());
15var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"));
16var_dump($_SESSION);
17var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"));
18var_dump($_SESSION);
19var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"));
20var_dump($_SESSION);
21var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"));
22var_dump($_SESSION);
23var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"));
24var_dump($_SESSION);
25var_dump(session_destroy());
26
27echo "Done";
28ob_end_flush();
29?>
30--EXPECT--
31*** Testing session_decode() : variation ***
32bool(true)
33bool(true)
34array(3) {
35  ["foo"]=>
36  &array(3) {
37    [0]=>
38    int(1)
39    [1]=>
40    int(2)
41    [2]=>
42    int(3)
43  }
44  ["guff"]=>
45  &array(3) {
46    [0]=>
47    int(1)
48    [1]=>
49    int(2)
50    [2]=>
51    int(3)
52  }
53  ["blah"]=>
54  &array(3) {
55    [0]=>
56    int(1)
57    [1]=>
58    int(2)
59    [2]=>
60    int(3)
61  }
62}
63bool(true)
64array(3) {
65  ["foo"]=>
66  &array(3) {
67    [0]=>
68    int(1)
69    [1]=>
70    int(2)
71    [2]=>
72    int(3)
73  }
74  ["guff"]=>
75  &array(3) {
76    [0]=>
77    int(1)
78    [1]=>
79    int(2)
80    [2]=>
81    int(3)
82  }
83  ["blah"]=>
84  &array(3) {
85    [0]=>
86    int(1)
87    [1]=>
88    int(2)
89    [2]=>
90    int(3)
91  }
92}
93bool(true)
94array(3) {
95  ["foo"]=>
96  &array(3) {
97    [0]=>
98    int(1)
99    [1]=>
100    int(2)
101    [2]=>
102    int(3)
103  }
104  ["guff"]=>
105  &array(3) {
106    [0]=>
107    int(1)
108    [1]=>
109    int(2)
110    [2]=>
111    int(3)
112  }
113  ["blah"]=>
114  &array(3) {
115    [0]=>
116    int(1)
117    [1]=>
118    int(2)
119    [2]=>
120    int(3)
121  }
122}
123bool(true)
124array(3) {
125  ["foo"]=>
126  &array(3) {
127    [0]=>
128    int(1)
129    [1]=>
130    int(2)
131    [2]=>
132    int(3)
133  }
134  ["guff"]=>
135  &array(3) {
136    [0]=>
137    int(1)
138    [1]=>
139    int(2)
140    [2]=>
141    int(3)
142  }
143  ["blah"]=>
144  &array(3) {
145    [0]=>
146    int(1)
147    [1]=>
148    int(2)
149    [2]=>
150    int(3)
151  }
152}
153bool(true)
154array(3) {
155  ["foo"]=>
156  &array(3) {
157    [0]=>
158    int(1)
159    [1]=>
160    int(2)
161    [2]=>
162    int(3)
163  }
164  ["guff"]=>
165  &array(3) {
166    [0]=>
167    int(1)
168    [1]=>
169    int(2)
170    [2]=>
171    int(3)
172  }
173  ["blah"]=>
174  &array(3) {
175    [0]=>
176    int(1)
177    [1]=>
178    int(2)
179    [2]=>
180    int(3)
181  }
182}
183bool(true)
184Done
185