1--TEST--
2Test basic function : variation1
3--INI--
4session.use_strict_mode=0
5session.save_handler=files
6session.gc_probability=1
7session.gc_divisor=1000
8session.gc_maxlifetime=300
9session.save_path=
10session.name=PHPSESSID
11--SKIPIF--
12<?php include('skipif.inc'); ?>
13--FILE--
14<?php
15
16ob_start();
17
18echo "*** Testing basic session functionality : variation1 ***\n";
19
20$session_id = 'testid';
21session_id($session_id);
22$path = __DIR__;
23var_dump(session_save_path($path));
24
25echo "*** Without lazy_write ***\n";
26var_dump(session_id($session_id));
27$config = ['lazy_write'=>FALSE];
28var_dump(session_start($config));
29var_dump($config);
30var_dump(session_write_close());
31var_dump(session_id());
32
33echo "*** With lazy_write ***\n";
34var_dump(session_id($session_id));
35var_dump(session_start(['lazy_write'=>TRUE]));
36var_dump(session_commit());
37var_dump(session_id());
38
39echo "*** Cleanup ***\n";
40var_dump(session_id($session_id));
41var_dump(session_start());
42var_dump(session_destroy());
43
44ob_end_flush();
45?>
46--EXPECT--
47*** Testing basic session functionality : variation1 ***
48string(0) ""
49*** Without lazy_write ***
50string(6) "testid"
51bool(true)
52array(1) {
53  ["lazy_write"]=>
54  bool(false)
55}
56bool(true)
57string(6) "testid"
58*** With lazy_write ***
59string(6) "testid"
60bool(true)
61bool(true)
62string(6) "testid"
63*** Cleanup ***
64string(6) "testid"
65bool(true)
66bool(true)
67