1--TEST--
2Test session_module_name() function : variation
3--SKIPIF--
4<?php include('skipif.inc'); ?>
5--INI--
6session.gc_probability=1
7session.gc_divisor=1
8session.gc_maxlifetime=0
9--FILE--
10<?php
11
12ob_start();
13
14/*
15 * Prototype : string session_module_name([string $module])
16 * Description : Get and/or set the current session module
17 * Source code : ext/session/session.c
18 */
19
20echo "*** Testing session_module_name() : variation ***\n";
21
22require_once "save_handler.inc";
23$path = __DIR__;
24session_save_path($path);
25session_module_name("files");
26
27session_start();
28$_SESSION["Blah"] = "Hello World!";
29$_SESSION["Foo"] = FALSE;
30$_SESSION["Guff"] = 1234567890;
31var_dump($_SESSION);
32$oldsession = $_SESSION;
33
34var_dump(session_write_close());
35session_start();
36// the session may have been GC'd or not; we accept either outcome
37var_dump($_SESSION === $oldsession || $_SESSION === []);
38var_dump(session_destroy());
39session_start();
40var_dump($_SESSION);
41var_dump(session_destroy());
42
43ob_end_flush();
44?>
45--EXPECT--
46*** Testing session_module_name() : variation ***
47array(3) {
48  ["Blah"]=>
49  string(12) "Hello World!"
50  ["Foo"]=>
51  bool(false)
52  ["Guff"]=>
53  int(1234567890)
54}
55bool(true)
56bool(true)
57bool(true)
58array(0) {
59}
60bool(true)
61