1--TEST--
2Test session_start() function : variation
3--SKIPIF--
4<?php include('skipif.inc'); ?>
5--FILE--
6<?php
7
8ob_start();
9
10/*
11 * Prototype : bool session_start(void)
12 * Description : Initialize session data
13 * Source code : ext/session/session.c
14 */
15
16echo "*** Testing session_start() : variation ***\n";
17
18session_start();
19
20$_SESSION['colour'] = 'green';
21$_SESSION['animal'] = 'cat';
22$_SESSION['person'] = 'julia';
23$_SESSION['age'] = 6;
24
25var_dump($_SESSION);
26var_dump(session_write_close());
27var_dump($_SESSION);
28
29session_start();
30session_destroy();
31echo "Done";
32ob_end_flush();
33?>
34--EXPECTF--
35*** Testing session_start() : variation ***
36array(4) {
37  ["colour"]=>
38  string(5) "green"
39  ["animal"]=>
40  string(3) "cat"
41  ["person"]=>
42  string(5) "julia"
43  ["age"]=>
44  int(6)
45}
46bool(true)
47array(4) {
48  ["colour"]=>
49  string(5) "green"
50  ["animal"]=>
51  string(3) "cat"
52  ["person"]=>
53  string(5) "julia"
54  ["age"]=>
55  int(6)
56}
57Done
58