mirror of
https://github.com/php/php-src.git
synced 2025-01-07 19:44:02 +08:00
29 lines
526 B
PHP
29 lines
526 B
PHP
--TEST--
|
|
Bug #70013 (Reference to $_SESSION is lost after a call to session_regenerate_id())
|
|
--SKIPIF--
|
|
<?php include('skipif.inc'); ?>
|
|
--INI--
|
|
session.save_handler=files
|
|
--FILE--
|
|
<?php
|
|
ob_start();
|
|
session_start();
|
|
|
|
$session = &$_SESSION;
|
|
|
|
$session['test'] = 1;
|
|
session_regenerate_id(false);
|
|
$session['test'] = 2;
|
|
|
|
var_dump($session['test'] === $_SESSION['test']);
|
|
|
|
$session['test'] = 3;
|
|
session_regenerate_id(true);
|
|
$session['test'] = 4;
|
|
|
|
var_dump($session['test'] === $_SESSION['test']);
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
bool(true)
|