1--TEST--
2Test session_save_path() function : variation
3--INI--
4session.gc_probability=0
5session.save_path=
6session.name=PHPSESSID
7session.save_handler=files
8--EXTENSIONS--
9session
10--SKIPIF--
11<?php include('skipif.inc'); ?>
12--FILE--
13<?php
14
15ob_start();
16
17echo "*** Testing session_save_path() : variation ***\n";
18
19$directory = __DIR__;
20var_dump(session_save_path());
21var_dump(session_save_path($directory));
22var_dump(session_save_path());
23
24var_dump(session_start());
25var_dump(session_save_path());
26var_dump(session_save_path($directory));
27var_dump(session_save_path());
28var_dump(session_destroy());
29
30var_dump(session_save_path());
31
32echo "Done";
33ob_end_flush();
34?>
35--EXPECTF--
36*** Testing session_save_path() : variation ***
37string(0) ""
38string(0) ""
39string(%d) "%stests"
40bool(true)
41string(%d) "%stests"
42
43Warning: session_save_path(): Session save path cannot be changed when a session is active in %s on line %d
44bool(false)
45string(%d) "%stests"
46bool(true)
47string(%d) "%stests"
48Done
49