1--TEST--
2Test session_regenerate_id() function : basic functionality
3--SKIPIF--
4<?php include('skipif.inc'); ?>
5--FILE--
6<?php
7
8ob_start();
9
10/*
11 * Prototype : bool session_regenerate_id([bool $delete_old_session])
12 * Description : Update the current session id with a newly generated one
13 * Source code : ext/session/session.c
14 */
15
16echo "*** Testing session_regenerate_id() : basic functionality ***\n";
17
18var_dump(session_id());
19var_dump(session_regenerate_id());
20var_dump(session_id());
21var_dump(session_start());
22var_dump(session_regenerate_id());
23var_dump(session_id());
24var_dump(session_destroy());
25var_dump(session_regenerate_id());
26var_dump(session_id());
27
28echo "Done";
29ob_end_flush();
30?>
31--EXPECTF--
32*** Testing session_regenerate_id() : basic functionality ***
33string(0) ""
34
35Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
36bool(false)
37string(0) ""
38bool(true)
39bool(true)
40string(%d) "%s"
41bool(true)
42
43Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d
44bool(false)
45string(0) ""
46Done
47