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