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