1--TEST--
2Test session_module_name() function : variation
3--EXTENSIONS--
4session
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__ . '/session_module_name_variation4';
18@mkdir($path);
19session_save_path($path);
20session_module_name("files");
21
22session_start();
23$_SESSION["Blah"] = "Hello World!";
24$_SESSION["Foo"] = FALSE;
25$_SESSION["Guff"] = 1234567890;
26var_dump($_SESSION);
27$oldsession = $_SESSION;
28
29var_dump(session_write_close());
30session_start();
31// the session may have been GC'd or not; we accept either outcome
32var_dump($_SESSION === $oldsession || $_SESSION === []);
33var_dump(session_destroy());
34session_start();
35var_dump($_SESSION);
36var_dump(session_destroy());
37
38ob_end_flush();
39?>
40--CLEAN--
41<?php
42$path = __DIR__ . '/session_module_name_variation4';
43rmdir($path);
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