1--TEST--
2Test session_commit() function : variation
3--SKIPIF--
4<?php include('skipif.inc'); ?>
5--INI--
6session.use_strict_mode=0
7--FILE--
8<?php
9
10ob_start();
11
12/*
13 * Prototype : bool session_commit(void)
14 * Description : Write session data and end session
15 * Source code : ext/session/session.c
16 */
17
18echo "*** Testing session_commit() : variation ***\n";
19
20$id = md5(uniqid());
21var_dump(session_id($id));
22var_dump(session_start());
23var_dump(session_id());
24var_dump($id === session_id());
25var_dump(session_commit());
26var_dump($id === session_id());
27var_dump(session_id());
28var_dump(session_start());
29var_dump($id === session_id());
30var_dump(session_id());
31var_dump(session_commit());
32var_dump($id === session_id());
33var_dump(session_id());
34var_dump(session_start());
35var_dump($id === session_id());
36var_dump(session_id());
37var_dump(session_commit());
38var_dump($id === session_id());
39var_dump(session_id());
40var_dump(session_start());
41var_dump(session_destroy());
42
43echo "Done";
44ob_end_flush();
45?>
46--EXPECTF--
47*** Testing session_commit() : variation ***
48string(0) ""
49bool(true)
50string(32) "%s"
51bool(true)
52NULL
53bool(true)
54string(32) "%s"
55bool(true)
56bool(true)
57string(32) "%s"
58NULL
59bool(true)
60string(32) "%s"
61bool(true)
62bool(true)
63string(32) "%s"
64NULL
65bool(true)
66string(32) "%s"
67bool(true)
68bool(true)
69Done
70
71