1--TEST--
2Test session_decode() function : basic functionality
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);
14$_SESSION["foo"] = 1234567890;
15$_SESSION["bar"] = "Hello World!";
16$_SESSION["guff"] = 123.456;
17var_dump($_SESSION);
18var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"));
19var_dump($_SESSION);
20var_dump(session_destroy());
21
22echo "Done";
23ob_end_flush();
24?>
25--EXPECT--
26*** Testing session_decode() : variation ***
27bool(true)
28array(0) {
29}
30array(3) {
31  ["foo"]=>
32  int(1234567890)
33  ["bar"]=>
34  string(12) "Hello World!"
35  ["guff"]=>
36  float(123.456)
37}
38bool(true)
39array(4) {
40  ["foo"]=>
41  &array(3) {
42    [0]=>
43    int(1)
44    [1]=>
45    int(2)
46    [2]=>
47    int(3)
48  }
49  ["bar"]=>
50  string(12) "Hello World!"
51  ["guff"]=>
52  &array(3) {
53    [0]=>
54    int(1)
55    [1]=>
56    int(2)
57    [2]=>
58    int(3)
59  }
60  ["blah"]=>
61  &array(3) {
62    [0]=>
63    int(1)
64    [1]=>
65    int(2)
66    [2]=>
67    int(3)
68  }
69}
70bool(true)
71Done
72