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
20var_dump(ini_get('session.use_strict_mode'));
21var_dump(session_id("test"));
22var_dump(session_start());
23var_dump(session_id());
24var_dump(session_commit());
25var_dump(session_id());
26var_dump(session_start());
27var_dump(ini_get('session.use_strict_mode'));
28var_dump(session_id());
29var_dump(session_commit());
30var_dump(session_id());
31var_dump(session_start());
32var_dump(session_id());
33var_dump(session_commit());
34var_dump(session_id());
35var_dump(session_start());
36var_dump(session_destroy());
37var_dump(ini_get('session.use_strict_mode'));
38
39echo "Done";
40ob_end_flush();
41?>
42--EXPECTF--
43*** Testing session_commit() : variation ***
44string(1) "0"
45string(0) ""
46bool(true)
47string(4) "test"
48bool(true)
49string(4) "test"
50bool(true)
51string(1) "0"
52string(4) "test"
53bool(true)
54string(4) "test"
55bool(true)
56string(4) "test"
57bool(true)
58string(4) "test"
59bool(true)
60bool(true)
61string(1) "0"
62Done
63