xref: /PHP-8.1/ext/session/tests/bug65475.phpt (revision b5a14e6c)
1--TEST--
2Bug #65475: Session ID is not initialized when session.usr_strict_mode=1
3--INI--
4session.save_handler=files
5session.name=PHPSESSID
6--EXTENSIONS--
7session
8--SKIPIF--
9<?php include('skipif.inc'); ?>
10--FILE--
11<?php
12ob_start();
13
14echo "Testing file module".PHP_EOL;
15session_start();
16$_SESSION['foo'] = 1234;
17$_SESSION['cnt'] = 1;
18$session_id = session_id();
19session_write_close();
20
21session_start();
22var_dump($session_id === session_id());
23$_SESSION['cnt']++;
24session_write_close();
25
26session_start();
27var_dump($session_id === session_id());
28var_dump($_SESSION['cnt']); // Should be int(2)
29session_write_close();
30?>
31--EXPECT--
32Testing file module
33bool(true)
34bool(true)
35int(2)
36