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
18/*
19 * Prototype : session.use_strict_mode=0
20 * Description : Test basic functionality.
21 * Source code : ext/session/session.c, ext/session/mod_files.c
22 */
23
24echo "*** Testing basic session functionality : variation1 ***\n";
25
26$session_id = 'testid';
27session_id($session_id);
28$path = __DIR__;
29var_dump(session_save_path($path));
30
31echo "*** Without lazy_write ***\n";
32var_dump(session_id($session_id));
33$config = ['lazy_write'=>FALSE];
34var_dump(session_start($config));
35var_dump($config);
36var_dump(session_write_close());
37var_dump(session_id());
38
39echo "*** With lazy_write ***\n";
40var_dump(session_id($session_id));
41var_dump(session_start(['lazy_write'=>TRUE]));
42var_dump(session_commit());
43var_dump(session_id());
44
45echo "*** Cleanup ***\n";
46var_dump(session_id($session_id));
47var_dump(session_start());
48var_dump(session_destroy());
49
50ob_end_flush();
51?>
52--EXPECT--
53*** Testing basic session functionality : variation1 ***
54string(0) ""
55*** Without lazy_write ***
56string(6) "testid"
57bool(true)
58array(1) {
59  ["lazy_write"]=>
60  bool(false)
61}
62bool(true)
63string(6) "testid"
64*** With lazy_write ***
65string(6) "testid"
66bool(true)
67bool(true)
68string(6) "testid"
69*** Cleanup ***
70string(6) "testid"
71bool(true)
72bool(true)
73