xref: /PHP-8.3/ext/session/tests/bug70013.phpt (revision b5a14e6c)
1--TEST--
2Bug #70013 (Reference to $_SESSION is lost after a call to session_regenerate_id())
3--EXTENSIONS--
4session
5--SKIPIF--
6<?php include('skipif.inc'); ?>
7--INI--
8session.save_handler=files
9--FILE--
10<?php
11ob_start();
12session_start();
13
14$session = &$_SESSION;
15
16$session['test'] = 1;
17session_regenerate_id(false);
18$session['test'] = 2;
19
20var_dump($session['test'] === $_SESSION['test']);
21
22$session['test'] = 3;
23session_regenerate_id(true);
24$session['test'] = 4;
25
26var_dump($session['test'] === $_SESSION['test']);
27?>
28--EXPECT--
29bool(true)
30bool(true)
31