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