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
14echo "*** Testing session_module_name() : variation ***\n";
15
16require_once "save_handler.inc";
17$path = __DIR__;
18session_save_path($path);
19session_module_name("files");
20
21session_start();
22$_SESSION["Blah"] = "Hello World!";
23$_SESSION["Foo"] = FALSE;
24$_SESSION["Guff"] = 1234567890;
25var_dump($_SESSION);
26$oldsession = $_SESSION;
27
28var_dump(session_write_close());
29session_start();
30// the session may have been GC'd or not; we accept either outcome
31var_dump($_SESSION === $oldsession || $_SESSION === []);
32var_dump(session_destroy());
33session_start();
34var_dump($_SESSION);
35var_dump(session_destroy());
36
37ob_end_flush();
38?>
39--EXPECT--
40*** Testing session_module_name() : variation ***
41array(3) {
42  ["Blah"]=>
43  string(12) "Hello World!"
44  ["Foo"]=>
45  bool(false)
46  ["Guff"]=>
47  int(1234567890)
48}
49bool(true)
50bool(true)
51bool(true)
52array(0) {
53}
54bool(true)
55